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

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Fri, 16 Oct 2020 05:47:57 +0200, Ralf Mardorf wrote:
>On Thu, 15 Oct 2020 21:05:04 -0600, Bob Proulx wrote:
>>leading or trailing spaces =20

File names that contain chars, that could invoke a (sub)shell,
function, ..., e.g. recursively executing itself, or even simple
commands, should be read as file names by scripts, but humans make
mistakes and those file names accidentally could be executed, when
writing and testing a script. Using just a common delimiter only, is
not that dangerous, but why using a common delimiter, such as a space?
I even wouldn't use the whole set of UTF-8 chars. Usage isn't dangerous,
but could become very annoying.

$ touch "=F0=9F=98=B0 =F0=9F=98=B1 =F0=9F=98=B2 =F0=9F=98=B3 =F0=9F=98=B4 =
=F0=9F=98=B5 =F0=9F=98=B6 =F0=9F=98=B7 =F0=9F=98=B8 =F0=9F=98=B9 =F0=9F=98=
=BA =F0=9F=98=BB =F0=9F=98=BC =F0=9F=98=BD =F0=9F=98=BE "



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20201016061055.6b1354b5>