Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
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

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 

Current Newswire:

YouTube is Big Fun And Useful

Convoluted Column Arithmetic Examples Using Awk On Linux Or Unix

30 Game Scripts You Can Write in PHP

WFTL Bytes! For Nov 20, 2008: Stock Tanks, Mozilla Rises, Moonlight on Dinosaurs

Jackalope Rising: Ubuntu 9.04 Alpha 1 As Early As Tomorrow

Building an OpenBSD Gateway - Part 1

Doing a diff Without Touching the Command Line

Creating a Daemon With Python

Via Panel PC Resists Shock, Liquids

Straight Talking About the Unspeakable ACTA

IT Engineer/Operations - multiple openings
Becton Dickinson
US-NJ-Franklin Lakes

Justtechjobs.com Post A Job | Post A Resume
:Bash Extended Globbing
Bash Extended Globbing
Oct 10, 2008, 16 :05 UTC (0 Talkback[s]) (1573 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

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers