ZSH Parameter Expansion
The Z Shell (ZSH) allows complex parameter expansions, well beyond the simple $VARNAME and similar offered in traditional /bin/sh. For example, toupper(3) case changing functionality can be written without calling a program such as tr(1) or awk(1).
$ echo $PAGER less $ echo $PAGER | awk '{print toupper}' LESS $ echo $PAGER | tr a-z A-Z LESS $ echo ${(U)PAGER} LESS
Finding this feature took several minutes pawing through the zshall(1) manual, searching on the word “case”. See also bash2zsh, which includes a ZSH reference card.
Technorati Tags: Unix