Difference between revisions of "Zsh"
From Christoph's Personal Wiki
| Line 3: | Line 3: | ||
After nearly 14 years of using the [[Bash]] shell, I have switched to using zsh as my primary shell. It is awesome! | After nearly 14 years of using the [[Bash]] shell, I have switched to using zsh as my primary shell. It is awesome! | ||
| + | |||
| + | ==Examples== | ||
| + | This section will include some quick-and-dirty examples of the power of zsh. | ||
| + | |||
| + | *The following was taken from the [http://www.zsh.org/mla/users/2005/msg00174.html Zsh Mailing List Archive]: | ||
| + | # zmv "programmable rename" | ||
| + | # Replace spaces in filenames with a underline | ||
| + | $ zmv '* *' '$f:gs/ /_' | ||
| + | # Change the suffix from *.sh to *.pl | ||
| + | $ zmv -W '*.sh' '*.pl' | ||
| + | # lowercase/uppercase all files/directories | ||
| + | $ zmv '(*)' '${(L)1}' # lowercase | ||
| + | $ zmv '(*)' '${(U)1}' # uppercase | ||
==External links== | ==External links== | ||
Revision as of 02:26, 16 June 2012
The Z shell (zsh) is a Unix shell that can be used as an interactive login shell and as a powerful command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
After nearly 14 years of using the Bash shell, I have switched to using zsh as my primary shell. It is awesome!
Examples
This section will include some quick-and-dirty examples of the power of zsh.
- The following was taken from the Zsh Mailing List Archive:
# zmv "programmable rename"
# Replace spaces in filenames with a underline
$ zmv '* *' '$f:gs/ /_'
# Change the suffix from *.sh to *.pl
$ zmv -W '*.sh' '*.pl'
# lowercase/uppercase all files/directories
$ zmv '(*)' '${(L)1}' # lowercase
$ zmv '(*)' '${(U)1}' # uppercase