O'Reilly logo

A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-Line Expansion (Substitution)

Refer to “Processing the Command Line” on page 354 for an introduction to command-line expansion in the Bourne Again Shell. The tcsh man page uses the term substitution instead of expansion; the latter is used by bash. The TC Shell scans each token on a command line for possible expansion in the following order:

1. History substitution (below)

2. Alias substitution (page 377)

3. Variable substitution (page 386)

4. Command substitution (page 379)

5. Filename substitution (page 378)

6. Directory stack substitution (page 379)

History

The TC Shell assigns a sequential event number to each command line. You can display this event number as part of the tcsh prompt (refer to “prompt” on page 393). Examples in this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required