Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/shell/alias_bash3.html
Дата изменения: Fri Jan 17 12:43:20 1997 Дата индексирования: Tue Oct 2 01:49:39 2012 Кодировка: Поисковые слова: reflection nebula |
You can use an existing command alias within another command alias. Define a first alias:
alias print=lp
This creates the alias print for the lp command used to print files to your default printer.
This alias can now be used within another alias. For example:
alias tree='cd; ls -R | print'
The alias tree will list the complete directory tree below the users home directory on the default printer. Multiple commands within an alias can be separated by a semicolon; just as they are on the command line.