sh scripting question
ralf-mardorf at riseup.net
Fri Oct 16 03:48:21 UTC 2020
On Thu, 15 Oct 2020 21:05:04 -0600, Bob Proulx wrote:
>leading or trailing spaces
IMO our scripts should not waste resources to work around insane path
and/or file names such as
$ touch " ; && || \\ .txt # "
or other issues, unless a third party could misuse missing workarounds.
In some real world corner cases, you better don't use a script at all,
where the scrip impossibly can work around the "issue" in the first
place. Scripts are useful tools, but they cannot be used for
everything. A script used to handle paths and files on our own
machines, run by us, should be written to handle sane path and file
names, since we should use only sane path and file names, period.
To me already "FreeBSD is great.txt" isn't a good file name, I would
name it "freebsd_is_great.txt", but that's just me. However,
naming it " FreeBSD is great.txt ", would be just stupid.
More information about the freebsd-questions