From Christoph's Personal Wiki
Jump to: navigation, search
Zsh lover.png

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!


This section will include some quick-and-dirty examples of the power of zsh.

# 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

Tutorials / examples