Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread Michael Orlitzky
On 4/16/20 11:15 AM, tu...@posteo.de wrote: > > Is there a way to express $fn in a way, so that > do_something get one filename at a time and > whole thing does not is torn apart by some > not so nice filenames? > What are your constraints... are you using bash, or just any POSIX shell? Can you

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread tuxic
On 04/16 05:21, Francesco Turco wrote: > On Thu, Apr 16, 2020, at 17:15, tu...@posteo.de wrote: > > Normally I would replace the asd* with the according > > > > find . -name 'asd*' -print0 | > > > > but I got in trpuble, because "do_something" > > now misunderstood the whole thing. > > What

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread tuxic
On 04/16 11:29, Rich Freeman wrote: > On Thu, Apr 16, 2020 at 11:19 AM Neil Bothwick 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

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread Rich Freeman
On Thu, Apr 16, 2020 at 11:19 AM Neil Bothwick 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

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread tuxic
On 04/16 04:19, Neil Bothwick 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 > >

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread Francesco Turco
On Thu, Apr 16, 2020, at 17:15, tu...@posteo.de wrote: > Normally I would replace the asd* with the according > > find . -name 'asd*' -print0 | > > but I got in trpuble, because "do_something" > now misunderstood the whole thing. What about the following command? find . -name 'asd*' -print0

Re: [gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread Neil Bothwick
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" Would this work? -- Neil Bothwick

[gentoo-user] Question about handling filenames with "illegal" characters...

2020-04-16 Thread tuxic
Hi, 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 . Normally I would replace the asd* with the according find . -name 'asd*' -print0 | but I got in trpuble, because "do_something"