Skip to Main Content
Learning Unix for Mac OS X, Second Edition
book

Learning Unix for Mac OS X, Second Edition

by Brian Jepson, Dave Taylor
December 2002
Beginner content levelBeginner
160 pages
4h 22m
English
O'Reilly Media, Inc.
Content preview from Learning Unix for Mac OS X, Second Edition

Shell Aliases and Functions

If you type command names that are hard for you to remember, or command lines that seem too long, you’ll want to learn about shell aliases and shell functions. These shell features let you abbreviate commands, command lines, and long series of commands. In most cases, you can replace them with a single word or a word and a few arguments. For example, one of the long pipelines (see Section 6.2) could be replaced by an alias or function named (for instance, aug). When you type aug at a shell prompt, the shell would list files modified in August, sorted by size.

Making an alias or function is almost as simple as typing in the command line or lines that you want to run. References in Section 10.1 earlier in this chapter, have more information. Shell aliases and functions are actually a simple case of shell programming. For more information on aliases, see Section 4.2.2.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X for Absolute Beginners

Mac OS X for Absolute Beginners

Wallace Wang
JMP Connections

JMP Connections

John Wubbel
Using csh & tcsh

Using csh & tcsh

Paul DuBois

Publisher Resources

ISBN: 0596004702Catalog PageErrata