When shell script is started, variables $0 to $9 are set to values
of parameters passed from the command line.
Example:
Create a script file test.sh by using vi editor:
vi test.sh
#!/bin/sh
echo Parameter 1: $1
echo Parameter 2: $2
Save the file, allow execution by changing the permission
and execute it with two input parameters hello and world:
./test.sh hello world
The following output will be displayed:
Parameter 1: hello
Parameter 2: world