Aliases
Contents:
Creating Custom Commands
Aliases for Common Commands
Shell Aliases with Command-Line Arguments
Aliases in ksh and bash
Sourceable Scripts
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 Functions
Simulated Bourne Shell Functions and Aliases
Creating Custom Commands
- In most shells, aliases (, , ) are an easy way to shorten a long command line or do a short series of commands.
- All except the oldest Bourne-type shells have shell functions (). 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.
- You can simulate shell functions () on older Bourne shells. These "fake functions" don't have much more power than aliases - but they're better than nothing!
- JP