This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: variable
- From: prz <Guy dot Przytula at riziv dot fgov dot be>
- To: cygwin at cygwin dot com
- Date: Mon, 19 Jun 2006 23:23:49 -0700 (PDT)
- Subject: Re: variable
- References: <4933240.post@talk.nabble.com>
thanks for the update
a simple testcase
tempdba:/cygdrive/c/workdir:echo $OBJECT
tempdba:/cygdrive/c/workdir:. ./testcase -a dt
print object dt
tempdba:/cygdrive/c/workdir:. ./testcase -a dt
print object dt
tempdba:/cygdrive/c/workdir:. ./testcase -a dl
print object dt
tempdba:/cygdrive/c/workdir:echo $OBJECT
dt
the code :
#!/bin/bash
while getopts "a:" option; do
case "$option" in
a) OBJECT=$OPTARG
;;
*) exit
esac
done
case "$OBJECT" in
dt)
echo "print object $OBJECT"
;;
dl)
echo "print object $OBJECT" ;;
*) usage
esac
#exit
Thanks for all info/help
Best Regards, Guy Przytula
--
View this message in context: http://www.nabble.com/variable-t1810207.html#a4949855
Sent from the Cygwin Users forum at Nabble.com.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/