#! /bin/sh echo "\$# = $#" for a do echo "a = $a" done echo "\$0 = $0" echo "\$1 = $1" echo "\$2 = $2" echo "\$3 = ${3}" x="abc" echo "\$x = $x" echo "\$xy = $xy" echo "\${x}y = ${x}y" # sample run: # $ ./x.sh a bb ccc # $# = 3 # a = a # a = bb # a = ccc # $0 = ./x.sh # $1 = a # $2 = bb # $3 = ccc # $x = abc # $xy = # ${x}y = abcy # $