Creating Custom Commands
Introduction to Shell Aliases
C-Shell Aliases with Command-Line Arguments
Setting and Unsetting Bourne-Type Aliases
Avoiding C-Shell Alias Loops
How to Put if-then-else in a C-Shell Alias
Fix Quoting in csh Aliases with makealias and quote
Shell Function Basics
Shell Function Specifics
Propagating Shell Functions
Simulated Bourne Shell Functions and Aliases
In most shells, aliases are an easy way to shorten a long command line or do a short series of commands. Section 29.2 through Section 29.10 cover C shell aliases. Section 29.4 through Section 29.14 cover aliases in bash, pdksh, and zsh.
All except the oldest Bourne-type shells have shell functions (Section 29.11), which are explained in Section 29.11 through Section 29.13. These are a cross between aliases and shell scripts. They're good both for shortening command lines and for running a short or long series of commands.
--JP and SJC
Copyright © 2003 O'Reilly & Associates. All rights reserved.