On 04/16 11:29, Rich Freeman wrote:
> On Thu, Apr 16, 2020 at 11:19 AM Neil Bothwick <n...@digimed.co.uk> wrote:
> >
> > On Thu, 16 Apr 2020 17:15:45 +0200, tu...@posteo.de wrote:
> >
> > > a loop like this
> > >
> > > for fn in asd* ; do
> > >     do_something $fn
> > > done
> > >
> > > fails, when a file is named like this:
> > >
> > >     List of OSses allowing spaces in filenames.txt
> > >
> >
> > do_something "$fn"
> >
> 
> That, or use ${fn} - that might be more resistant to quotes in
> filenames though I haven't looked closely into that.
> 
> If you look at most ebuilds they're full of quoted or braced variables
> for exactly this reason.  If you want to stick spaces in your
> directory paths that is your mess to deal with, but Gentoo won't
> break.
> 
> On a side note, if you have a directory full of crufty filenames the
> detox program is very useful for cleaning them up.  Of course, that is
> invasive and you probably don't want to rely on that in your script.
> 
> -- 
> Rich
> 

Hi Rich,

these [CENSORED] filenames are mainly copies from the contents of
usbstick, which were previoysly filled using machines, which were
neither UNICES nor Linuxxes nor MacOSxxes ... you know what I mean.
I myself stick to sane filenames. 

Detox is known to me. But for certain reasons I cannot change the
filenames now...I have to process them first.

Cheers!
Meino



Reply via email to