www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/02/20:12:27

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <37A632C5.DC995268@werple.net.au>
Date: Tue, 03 Aug 1999 10:07:33 +1000
From: Tim Davidson <timd AT werple DOT net DOT au>
X-Mailer: Mozilla 4.6 [en-gb] (Win95; I)
X-Accept-Language: en,en-GB,en-*
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: B20.1: bash getopts?
References: <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 AT sourceware DOT cygnus DOT com

-- 
Tim Davidson
timd AT werple DOT net DOT au

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019