Date: Fri, 16 Oct 2020 15:05:50 +0200 From: Polytropon <freebsd@edvax.de> To: Kurt Hackenberg <kh@panix.com> Cc: freebsd-questions@freebsd.org Subject: Re: sh scripting question Message-ID: <20201016150550.6562ab84.freebsd@edvax.de> In-Reply-To: <c6096f5d-84f5-af81-7407-9bda06c7b240@panix.com> References: <24456.60388.135834.43951@jerusalem.litteratus.org> <20201015204226099763897@bob.proulx.com> <c6096f5d-84f5-af81-7407-9bda06c7b240@panix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Oct 2020 23:14:13 -0400, Kurt Hackenberg wrote: > On 2020-10-15 23:05, Bob Proulx wrote: > > > Oh you are tormenting us now. :-) There are some subtle issues here. > > > Maybe a shell is the wrong tool. No, it's not, it's just not as trivial as if the filenames would have been "normalized", i. e., if they wouldn't use reserved (but valid!) characters such as spaces. :-) I have dealt with this kind of torture many times already, and I'm quite happy I have a script that "normalizes" filenames for further use, if this is possible and allowed; if not, there are specific precautions you have to observe in your sh code. The common "for f in *; do ... bla $f ... done" just doesn't work anymore. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201016150550.6562ab84.freebsd>