public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: B20.1: bash getopts?
       [not found] <03F4742D8225D21191EF00805FE62B990205E227@AA-MSG-01>
@ 1999-08-02 19:58 ` Robert Story
  1999-08-31 23:49   ` Robert Story
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Story @ 1999-08-02 19:58 UTC (permalink / raw)
  To: cygwin

I wrote :
>
> I'm trying to run a bash script which uses getopts under cygwin. The
> script works on my linux box, but reports 'getopts not found' under
> cygwin.
>
> #/bin/bash
> [snip]

A helpful soul responded:
>sounds like you're not really using bash, but
>
>how about changing your first line to #!/bin/bash instead of #/bin/bash ?
>


Doh! I can't believe I missed that.  Please pass the DUNCE cap, and 
I'll go sit in the corner.  :-(


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: B20.1: bash getopts?
  1999-08-02 19:58 ` B20.1: bash getopts? Robert Story
@ 1999-08-31 23:49   ` Robert Story
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Story @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

I wrote :
>
> I'm trying to run a bash script which uses getopts under cygwin. The
> script works on my linux box, but reports 'getopts not found' under
> cygwin.
>
> #/bin/bash
> [snip]

A helpful soul responded:
>sounds like you're not really using bash, but
>
>how about changing your first line to #!/bin/bash instead of #/bin/bash ?
>


Doh! I can't believe I missed that.  Please pass the DUNCE cap, and 
I'll go sit in the corner.  :-(


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: bash getopts?
  1999-08-02 17:09 ` Tim Davidson
@ 1999-08-31 23:49   ` Tim Davidson
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Davidson @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Hi,

You forgot the "!" in the first line of the script:

	#!/bin/bash

Tim

Robert Story wrote:
> 
> Environment: Cygwin 20.1 beta, WinNT 4.0 build 1381 sp 4
> 
> I'm trying to run a bash script which uses getopts under cygwin. The
> script works on my linux box, but reports 'getopts not found' under
> cygwin. The bash help list getopts as a valid built-in command. The
> script in question can be reduced to :
> 
> #/bin/bash
> #
> while getopts ab flag
> do
>         case "$flag" in
>         a) echo "Flag a";;
>         b) echo "Flag b";;
>         ?) echo "Flag unknown";;
>         esac
> done
> 
> I could not find any scripts in the bin directory that use getopts.
> Should it work? Or is the help incorrect?
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

-- 
Tim Davidson
timd@werple.net.au

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* B20.1: bash getopts?
  1999-08-02 13:14 Robert Story
  1999-08-02 17:09 ` Tim Davidson
@ 1999-08-31 23:49 ` Robert Story
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Story @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Environment: Cygwin 20.1 beta, WinNT 4.0 build 1381 sp 4

I'm trying to run a bash script which uses getopts under cygwin. The 
script works on my linux box, but reports 'getopts not found' under 
cygwin. The bash help list getopts as a valid built-in command. The 
script in question can be reduced to :

#/bin/bash
#
while getopts ab flag
do
	case "$flag" in
	a) echo "Flag a";;
	b) echo "Flag b";;
	?) echo "Flag unknown";;
	esac
done



I could not find any scripts in the bin directory that use getopts. 
Should it work? Or is the help incorrect?

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: bash getopts?
  1999-08-02 13:14 Robert Story
@ 1999-08-02 17:09 ` Tim Davidson
  1999-08-31 23:49   ` Tim Davidson
  1999-08-31 23:49 ` Robert Story
  1 sibling, 1 reply; 6+ messages in thread
From: Tim Davidson @ 1999-08-02 17:09 UTC (permalink / raw)
  To: cygwin

Hi,

You forgot the "!" in the first line of the script:

	#!/bin/bash

Tim

Robert Story wrote:
> 
> Environment: Cygwin 20.1 beta, WinNT 4.0 build 1381 sp 4
> 
> I'm trying to run a bash script which uses getopts under cygwin. The
> script works on my linux box, but reports 'getopts not found' under
> cygwin. The bash help list getopts as a valid built-in command. The
> script in question can be reduced to :
> 
> #/bin/bash
> #
> while getopts ab flag
> do
>         case "$flag" in
>         a) echo "Flag a";;
>         b) echo "Flag b";;
>         ?) echo "Flag unknown";;
>         esac
> done
> 
> I could not find any scripts in the bin directory that use getopts.
> Should it work? Or is the help incorrect?
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

-- 
Tim Davidson
timd@werple.net.au

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* B20.1: bash getopts?
@ 1999-08-02 13:14 Robert Story
  1999-08-02 17:09 ` Tim Davidson
  1999-08-31 23:49 ` Robert Story
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Story @ 1999-08-02 13:14 UTC (permalink / raw)
  To: cygwin

Environment: Cygwin 20.1 beta, WinNT 4.0 build 1381 sp 4

I'm trying to run a bash script which uses getopts under cygwin. The 
script works on my linux box, but reports 'getopts not found' under 
cygwin. The bash help list getopts as a valid built-in command. The 
script in question can be reduced to :

#/bin/bash
#
while getopts ab flag
do
	case "$flag" in
	a) echo "Flag a";;
	b) echo "Flag b";;
	?) echo "Flag unknown";;
	esac
done



I could not find any scripts in the bin directory that use getopts. 
Should it work? Or is the help incorrect?

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <03F4742D8225D21191EF00805FE62B990205E227@AA-MSG-01>
1999-08-02 19:58 ` B20.1: bash getopts? Robert Story
1999-08-31 23:49   ` Robert Story
1999-08-02 13:14 Robert Story
1999-08-02 17:09 ` Tim Davidson
1999-08-31 23:49   ` Tim Davidson
1999-08-31 23:49 ` Robert Story

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).