* getopt command for sh5
@ 1990-01-18 16:26 wright
0 siblings, 0 replies; only message in thread
From: wright @ 1990-01-18 16:26 UTC (permalink / raw)
I am trying to do some script writing in sh5 and need some help with an
embedded shell command...
I am trying to parse out an argument from a command line into another script
using the getopt command, here is what I have. I cannot get the argument to be
recognized.
set -- `getopt s: $ARGV` # put the arg "s" into the var ARGV
for i in $ARGV
do
case $i in
-s) CALLED=YES ; shift;;
--) (echo "Invalid argument") ; break;;
esac
done
The manual is very cryptic with this command and there are not very many sh5
experts around either. I recieved this script from a Sun system and it works
fine in the following context:
while getopt s ARGV
do
case $ARGV in
s) CALLED=YES ;;
\?) (echo "Invalid argument") ;;
esac
done
I would like to find the appropriate sequence for this to complete my script.
Thanks in advance...
--
+----------------------------+-----------------------------------------+
| Dave Wright | Phone: (714) 952-6320 |
| McDonnell Douglas M&E | Internet: wright@mdcbbs.com |
| Software Engineering | UUCP: uunet!mdcbbs.com!wright |
| P.O.Box 6011 | PSI: PSI%31060099980019::WRIGHT |
| Cypress, Ca. 90630 | |
+----------------------------+-----------------------------------------+
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1990-01-18 16:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1990-01-18 16:26 getopt command for sh5 wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox