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

Positional Parameters

Positional parameters comprise the command name and command-line arguments. These parameters are called positional because you refer to them by their position on the command line. You cannot use an assignment statement to change the value of a positional parameter. However, the bash set builtin (page 460) enables you to change the value of any positional parameter except the name of the calling program (the command name). The tcsh set builtin does not change the values of positional parameters.

$0: Name of the Calling Program

The shell expands $0 to the name of the calling program (the command you used to call the program—usually the name of the program you are running). This parameter is numbered zero because it appears ...

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