Mail Archives: cygwin/2001/01/25/11:31:13
at least bash includes getopt...
$ cat test.sh
#!/bin/bash
while getopts x: c
do
case $c in
x) hat=$OPTARG;;
esac
done
echo hat: $hat
ds83392 AT UKEQTGNT1 ~
$ ./test.sh -x hello
hat: hello
-----Original Message-----
From: Galen Boyer [mailto:galenboyer AT yahoo DOT com]
Sent: 25 January 2001 15:52
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: KSH is pdksh
On 24 Jan 2001, dkarr AT tcsi DOT com wrote:
> However, as I've come to discover after much pain, if you're
> already using Cygwin, there isn't much point to installing
> pdksh. It's easy enough to create a symlink from
> "/usr/bin/ksh.exe" to "/usr/bin/bash.exe". Poof. You have
> Korn shell. As far as I can tell, Bash can substitute for Korn
> shell in every area I'm familiar with.
Well, if I could find the equivalent to getopts, I think I could
get along without kornshell. I found this feature to be
extremely useful when I was a heavy-duty KSH programmer, and now
I am coding a few scripts again and would like to take advantage
of it.
--
Galen Boyer
Fingers and toes, fingers and toes, forty things we share.
Forty one if you include, the fact that we don't care.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -