z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Arguments in aliases

z/OS UNIX System Services User's Guide
SA23-2279-00

Any arguments that follow an alias are treated just as if they had been following the command that the alias stands for. For example, if you define the alias f as follows:
alias f "ls"
the shell replaces f with ls, which is the command to list files in a directory.
You can refer to arguments in an alias by simply adding them at the end of the alias as you would with a command. For example:
f -la
would perform the ls command with the arguments la, which will list all the files in the directory in a long directory listing format. And,
f /bin
will list the contents of the /bin directory.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014