January 2014
Beginner
132 pages
2h 45m
English
The shell allows you to perform different types of manipulations right before executing a line. In the following section we'll learn how to take advantage of each of the different forms of expansion and substitution available in zsh.
Parameter expansion allows you to replace known variables in between the assignments of the command line. Simply put, parameter substitution is the mechanism by which the shell can change the following:
% foo=Hello
It will be changed to the following:
% echo "${foo}, world!" > Hello, world!
Notice how the variable foo we declared in the previous line is replaced inside the arguments of echo with its actual value. You should be paying special attention to that peculiar ${} construction. ...