Built-In Variables


The Linux kernel provides the shell with several built-in variables. You cannot modify the results of these variables. These include

  • $# Number of positional parameters passed to the shell (which we used in the last section)

  • $? Completion code of the last command or shell program executed within the shell (returned value)

  • $0 The name of the shell program

  • $* A single string of all arguments passed at the time of invocation of the shell program

These are just a few of the basic tasks and things you can do with your shell. We'll go even deeper in Chapter 33, "Command-Line Master Class."



SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net