#!/bin/sh #************************************************** #* * #* This shell script allows the user to enter * #* arguments on the command line. It displays * #* the argument number followed by the value of * #* the argument * #* * #************************************************** echo "number of arguments = $#" i=1 a=Arg while [ $# -gt 0 ] do echo $a$i = $1 shift i=`expr $i + 1` done # pos_args a b c d # pos_args 'a b' 'c d' y z # pos_args cat dog frog bat # pos_args * # pos_args date # pos_args `date`