Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Server Daily
IT Management Daily
Subscribe News
Subscribe PR
Subscribe Security

internet.com
Internet News
Small Business

Advertise
Newsletters
Tech Jobs
E-mail Offers

 






Current Newswire:

Tech Comics: "Groundhog Day"

Want a Job? Learn Linux

PC-BSD 9 review – to FreeBSD what Ubuntu is to Debian

Time to dispel open source myths, says Liam Maxwell

SECURITY: Nmap Inside and Out

Eight features Windows 8 'borrowed' from Linux

Malware devs embrace open-source

A tale of two distros: Ubuntu and Linux Mint

Raspberry Pi benchmarked against Beagleboard, low price is long term

20 popular Ubuntu Linux apps you may want to try



Applications Management Engineer Sr (NYC)
Next Step Systems
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
:Bash Extended Globbing
Bash Extended Globbing
Oct 10, 2008, 16 :05 UTC (0 Talkback[s]) (4676 reads)

(Other stories by Mitch Frazier)

"However, probably the most interesting extended globbing syntax is the "!(...)" syntax for matching everything except (ie not matching). But, be careful, this doesn't always do what you might expect. For example, let's list all the files that aren't JPEGs or GIFs. One's first thought might be something like this:

$ ls *!(.jpg|.gif) # wrong, Wrong, WRONG

But that doesn't work because the ".jpg" and the ".gif" of any file's name end up getting matched by the "*" and the null string at the end of the file name is the part that ends up not matching the "!(...)" pattern."

Complete Story

Related Stories:
Bash Parameter Expansion(Oct 03, 2008)
Tip: Easily Enable Syntax Highlighting in Nano Editor(Sep 27, 2008)
Bash Shell: Take Control of PS1, PS2, PS3, PS4 and PROMPT_COMMAND(Sep 12, 2008)
Bash Shell PS1: 10 Examples to Make Your Linux Prompt like Angelina Jolie(Sep 12, 2008)
Things You Should Never EVER Type in Linux. Ever!(Aug 29, 2008)



No talkbacks posted.
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!

..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP