I understand and accept the premise that defensive1 shell scripting is both prudent and, in the longer term, more sustainable.
Many of the answers to text processing questions here follow this principle by building into the answers contingencies for unorthodox filenames; that might contain spaces, dashes and new lines.
How prevalent are new lines in filenames? Specifically:
- Do any applications create filenames that include newlines by default?
- Are there any situations where it would be desirable to create such filenames?
- Or are they predominantly an instance of user error?
[1] Meaning planning for and managing the broadest possible range of scenarios and contingencies...
Question inspired by the (rather plaintive) comment on this question.