Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Oct 2020 05:47:57 +0200
From:      Ralf Mardorf <ralf-mardorf@riseup.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: sh scripting question
Message-ID:  <20201016054735.33ad768e@archlinux>
In-Reply-To: <20201015204226099763897@bob.proulx.com>
References:  <24456.60388.135834.43951@jerusalem.litteratus.org> <20201015204226099763897@bob.proulx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Oct 2020 21:05:04 -0600, Bob Proulx wrote:
>leading or trailing spaces

Hi,

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,
see

https://lists.claws-mail.org/pipermail/users/2020-October/027113.html ,

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.

2 Cents,
Ralf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201016054735.33ad768e>