Computer Services & Repairs
Chicago and Suburbs
 

Table of Contents


 

7.05 Positional Parameters

Symbol

Description

$0

linux command

$n

the number of the position on the command line, where n represents a number.

${nn}

any number that exceeds a single digit

$#

the count of the command line arguments

$*

all the command line arguments beginning with the first argument

$@

the command line arguments individually quoted. Is the same as $*, except when enclosed in double quotation marks

$?

the return status of the most recently executed command

$$

the process id of the current process

$!

the process id of the last background command

$*”

all the command line arguments beginning with 1 and expanded to a single argument, Example: “$1 $2 $3”

$@”

the command line arguments individually quoted and expanded to separate arguments Example: “ “$1” “$2” “$3”


Example:

[bash]$ echo $$ # will display process id of the current process.

 
 
   

Copyright 2006 © Burnnet Computers LLC.