public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Tim Davidson <timd@werple.net.au>
To: cygwin@sourceware.cygnus.com
Subject: Re: B20.1: bash getopts?
Date: Tue, 31 Aug 1999 23:49:00 -0000	[thread overview]
Message-ID: <37A632C5.DC995268@werple.net.au> (raw)
Message-ID: <19990831234900.Tsvi8M-JNdl_hs-wisgi8597_WWoSNOhPwLON1J_aqg@z> (raw)
In-Reply-To: <v04210103b3cbaa1035f4@[207.69.181.181]>

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

  reply	other threads:[~1999-08-31 23:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-02 13:14 Robert Story
1999-08-02 17:09 ` Tim Davidson [this message]
1999-08-31 23:49   ` Tim Davidson
1999-08-31 23:49 ` Robert Story
     [not found] <03F4742D8225D21191EF00805FE62B990205E227@AA-MSG-01>
1999-08-02 19:58 ` Robert Story
1999-08-31 23:49   ` Robert Story

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37A632C5.DC995268@werple.net.au \
    --to=timd@werple.net.au \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).