On Sun, May 12, 2024 at 07:31:41PM +1000, Alexis wrote:
> Страхиња Радић <[email protected]> writes:
>
> > When `while ... read ...` idiom is used, it is advisable to clear IFS to
> > turn off field splitting
>
> *nod* Fair point; it's not set by default, so i didn't think to note that
> any manual setting of it should be overridden for this.
The ksh(1) shell sets IFS by default to a space, tab and a newline
character.
>
> > and use -r to avoid interpretation of backslash sequences in the input:
>
> i wondered about that in this context. If people putting odd / inappropriate
> things in directory names are a concern ("weird characters", as you wrote
> upthread), what do we do about the possibility of someone having consciously
> put e.g. a \t in a directory name because they were assuming that it _would_
> get interpreted when required?
>
>
> Alexis.
Well, that's one way to control this trainwreck of a script; just say
that any name containing "inappropriate" characters aren't allowed!
May I ask why you don't simply use rsync(1) (or even openrsync(1) from
the OpenBSD base system)?
--
Andreas (Kusalananda) Kähäri
Uppsala, Sweden
.