Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/shell/alias_csh2.1.html
Дата изменения: Fri Jan 17 12:43:20 1997 Дата индексирования: Tue Oct 2 02:13:00 2012 Кодировка: Поисковые слова: п п п п п р п р п р п р п р п р п р п р п п р п |
To pass a single argument to a command alias:
alias print 'lpr \\!^ -Pps5' print memo.txt
The notation !^ causes the first argument to the command alias print to be inserted in the command at this point. The command that is carried out is:
lpr memo.txt -Pps5
Notice that the ! character is preceded by a \\ to prevent it being interpreted by the shell as a history command.
To pass each argument to a command alias:
alias print 'lpr \\!* -Pps5' print part1.ps glossary.ps figure.ps
The notation !* causes each argument given to the alias print to be inserted in the command at this point. The command that is carried out is:
lpr part1.ps glossary.ps figure.ps -Pps5
Notice that the ! character is preceeded by a \\ to prevent it being interpreted by the shell as a history command.