UTERMINAL
TERMINAL
NEXT
$V1$
PAUSE
BOTCLEAN
ENCORE5
CLEAN
ENCORE
BOX
COMMAND
GO
alias
SYNTAX
alias new_command transformed-command
FUNCTION
alias is not a stand-alone command but
rather a shorthand facility within csh.
The alias mechanism is normally used to create a
short name for long commands with many arguments.
alias is also used for creating another name
(hopefully simpler or easier to remember) for the
existing commands.
By using the alias mechanism, let us
transform the command who | wc -l into
the command howmany to see how many users
are logged on. Note that because the transformed
expression contains spaces, it needs to be
enclosed in single quotes: '....'.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Try alias howmany 'who | wc -l'
Please enter alias howmany 'who | wc -l'
I guess I must type this for you:
$PROMPT$
FORGET1
$PROMPT$alias howmany 'who | wc -l'
Observe the result on the terminal.
$PROMPT$
Let us use the new aliased command howmany
to see how many users are on your system!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please try howmany
Please enter howmany
I guess I must type this for you:
$PROMPT$
FORGET2
$PROMPT$howmany
Observe the result on the terminal.
$B$
DOSJMP
1
OVER
$PROMPT$
The result produced using an alias under csh
is the same as using who | wc -l under sh .