[scrpt2.1.1]

contd ...

The positional parameter $0 refers to the command name or name of the executable file containing the shell script.

Only nine command line arguments can be accessed, but you can access more than nine using the shift command

All the positional parameters can be referred to using the special parameter $*. This is useful when passing filenames as arguments. For example:

   $ cat printps
   # This script converts ASCII files to PostScript
   # and sends them to the PostScript printer ps1
   # It uses a local utility "a2ps"
   a2ps $* | lpr -Pps1
   $ printps elm.txt vi.ref msg

This processes the three files given as arguments to the command printps.


Top document