[HPADM] Fin of getopts

From: BAKHSHESH Kazem (BAKHSHEK@ESSILOR.fr)
Date: Tue Dec 10 2002 - 12:48:46 EST


Hi admins,

Thanks very much about getopts .
Here some nice solutions
=======Raju Pillai

getopts : abc ARG
case $1 in
    a )
        AFLAG=$1
        AARG=$3
        shift
        ;;
    b)
        BFLAG=$1
        BARG=$3
        shift
        ;;
   c)
        shift
        break
        ;;
esac

============ Lodge David
while getopts ab: name
do
   case $name in
   a) aflag=1;;
   b) bflag=1; barg="${OPTARG}";;
   ?) print "unknown arg"
done
shift $((${OPTIND} - 1))

Cordialement(Best regards)
Kazem Bakhshesh(administrateur Système:HP-UX)
E-Mail : bakhshek@essilor.fr
Tel : 01.48.98.73.09

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:23 EDT