May 2017
Beginner
552 pages
28h 47m
English
Most applications accept arguments in different formats. Suppose -p and -v are the options available, and -k N is another option that takes a number. Also, the command requires a filename as argument. This application can be executed in multiple ways:
Within a script, the command-line arguments can be accessed by their position in the command line. The first argument will be $1, the second $2, and so on. This script will display the first three command line arguments:
echo $1 $2 $3
It's more common to iterate through the command arguments one at a time. The shift command shifts eachh argument one space to the left, ...