On Mon, Aug 11, 2008 at 7:15 AM, Andrew McGill <glug at lunch.za.net> wrote:
> On Sunday 10 August 2008 23:03:53 Colm Buckley wrote:
> > I hate that
> > nullglob is not set by default; I can't think of any realistic cases
> > keeping the literal glob is the more expected / less surprising
> Nullglob allows skipping quotes where they are not absolutely required.
> trick can be used from knowledge and ignorance:
> ls | sed s/[^0-9]*//g # until you have a file named
> echo Would you like a cookie? # until there a file called
>> After setting nullglob,
> shopt -s nullglob
> those work "as expected" by someone who understood the bash man page. As a
> bonus, being able to leaving off quotes saves on finger strain - a limited
> commodity - and allows you to gently learn about wildcards.
Hah; fun times. Omission of proper quotes around sed regexps and expected
literals is a corporal offence, though.
Colm Buckley / colm at tuatha.org / +353 87 2469146
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!