Cover V09, I07
Article
Listing 1
Listing 2
Listing 3

jul2000.tar


Listing 2: option.sh

# option demo
while [ "$#" -gt 0 ] 
do # set the command line arguments 
   case $1 in 
     # PARM with white space
     -PARM) shift;PARM=$1  
         shift 
         ;; 
     # PARM with no white space.  Cut out the length of 'PARM'
     -PARM*) PARM=`echo $1|cut -c6-` 
         shift 
         ;; 
      *) echo "Illegal Command-line Option" 
         exit 
         ;; 
  esac 
done 
if ! [ -z "$PARM" ]
then # echo if set
   echo $PARM
fi