January 2001
Intermediate to advanced
480 pages
7h 22m
English
Aliases are command name macros used as shorthand for other commands, especially frequently used ones. This saves a lot of typing time. Aliases are defined with the alias name=value command. For example, we could create an alias for the print command like this:
$ alias p=print
Whenever p is invoked, print is executed:
$ p Hello Hello
Make sure to enclose the value in quotes if it contains whitespace. Here we create an alias l that is set to the ls –Fac command:
$ alias l="ls —Fac"
Now when you type in l, ls –Fac is executed:
$ l ./ ../ compress.Z* func.Z* test/ uncompress.Z* . . .
Alias values can contain any text, including special characters, like wildcards, pipes, or I/O redirection operators. Let's change alias l so that ...
Read now
Unlock full access