Re: replacement for the nullglob bashism

2004-04-15 Thread Colin Watson
On Thu, Apr 15, 2004 at 08:50:28AM +0200, Thomas Viehmann wrote: > I'm looking for a substitute for (unposixly) doing "shopt -s nullglob" > before a loop over an expansion. > > Is there a good substitution? > > The shortest I came up with was doing > > [ "$(echo *.foo)" = "*.foo" ] || for X in *

Re: replacement for the nullglob bashism

2004-04-15 Thread Colin Watson
On Thu, Apr 15, 2004 at 08:50:28AM +0200, Thomas Viehmann wrote: > I'm looking for a substitute for (unposixly) doing "shopt -s nullglob" > before a loop over an expansion. > > Is there a good substitution? > > The shortest I came up with was doing > > [ "$(echo *.foo)" = "*.foo" ] || for X in *

replacement for the nullglob bashism

2004-04-15 Thread Thomas Viehmann
Hi. I'm looking for a substitute for (unposixly) doing "shopt -s nullglob" before a loop over an expansion. Is there a good substitution? The shortest I came up with was doing [ "$(echo *.foo)" = "*.foo" ] || for X in *.foo ; do foo "${X}"; done Kind regards and thanks in advance T. -- Thoma

replacement for the nullglob bashism

2004-04-14 Thread Thomas Viehmann
Hi. I'm looking for a substitute for (unposixly) doing "shopt -s nullglob" before a loop over an expansion. Is there a good substitution? The shortest I came up with was doing [ "$(echo *.foo)" = "*.foo" ] || for X in *.foo ; do foo "${X}"; done Kind regards and thanks in advance T. -- Thoma