The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Examples of passing arguments given to a command alias

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.


[Home] [Search] [Index]



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру