http://www.linux-mag.com/2003-12/power_01.html), we looked at ways to match groups of files in a hurry, with a minimum of typing, by using shell wildcards. Last month, we saw some of the wilder things that the Z shell, zsh, can do to make computing easier. This month we’ll mix those two topics and look at some of the most powerful zsh wildcards and similar, related features in other shells.

" />
x
Loading
 Loading
Hello, Guest | Login | Register

Wilder Wildcards

In last December’s column, “Wildcards Gone… Wild” (available online at http://www.linux-mag.com/2003-12/power_01.html), we looked at ways to match groups of files in a hurry, with a minimum of typing, by using shell wildcards. Last month, we saw some of the wilder things that the Z shell, zsh, can do to make computing easier. This month we’ll mix those two topics and look at some of the most powerful zsh wildcards and similar, related features in other shells.

In last December’s column, “Wildcards Gone… Wild” (available online at http://www.linux-mag.com/2003-12/power_01.html), we looked at ways to match groups of files in a hurry, with a minimum of typing, by using shell wildcards. Last month, we saw some of the wilder things that the Z shell, zsh, can do to make computing easier. This month we’ll mix those two topics and look at some of the most powerful zsh wildcards and similar, related features in other shells.

Even if you aren’t interested in wildcards, you might want to read on. We’ll dig deep into twisty corners of the shell. For instance, we’ll see how to set a shell option temporarily and we’ll use an alias as a sort of “preprocessor” for a shell function.

Most examples here are specific to one shell. If you don’t normally use that shell, remember that there’s no need to switch permanently. As we said in last month’s Power Tip, “Changing Shells Temporarily” (available online at http://www.linux-mag.com/2004-02/power_01.html), you can drop into another shell temporarily. You can also leave a shell process suspended and bring it to the foreground whenever you need its extra power — power like the examples you’ll see below. The December 2002 column, “Using Power Wisely,” explains suspending shells. (It’s online at http://www.linux-mag.com/2002-12/power_01.html.)

Anything But…

It’s easy to make wildcards match a lot. In the December column, we saw two ways to match “anything but.” One is a character range (inside square brackets) that starts…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Claws Mail: Mail with Attitude
  2. IE8 vs. Firefox: Four Things Firefox Could Learn from IE
  3. Vimperator: Use Firefox the Vim Way
  4. Customize Chrome for Better Browsing
  5. Jetpack Gearing Up for Production: Look Out Chrome?
Follow Linux Magazine
Rackspace