Built-In Variables

Built-in variables are special variables provided to shell by Linux that you can use to make decisions within a shell program. You cannot modify the values of these variables within the shell program.

Some of these variables are:

Image $#Number of positional parameters passed to the shell program

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

Image $0The name of the shell program ...

Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.