delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/19/15:56:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 19 May 2003 15:55:51 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: ash missing 'getopts' builtin (gold star alert)
In-Reply-To: <20030519192444.GB24066@redhat.com>
Message-ID: <Pine.GSO.4.44.0305191555090.26639-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Mon, 19 May 2003, Christopher Faylor wrote:

> On Mon, May 19, 2003 at 11:31:41AM -0700, Dario Alcocer wrote:
> >On Mon, May 19, 2003 at 06:46:28PM +0200, Corinna Vinschen wrote:
> >> On Mon, May 19, 2003 at 08:57:41AM -0700, Dario Alcocer wrote:
> >> > In fact, I'd say that getopts is almost necessary for scripting,
> >> > because its inclusion allows scripts to be on an equal footing with
> >> > compiled programs, in that both can accept command line options. This
> >> > means I can write small programs as shell scripts instead of as a
> >> > compiled program; this is entirely consistent with traditional Unix
> >> > programming philosophy, which encourages the use of shell scripts for
> >> > small programs.
> >>
> >> There is that problem left that getopts isn't quite "plain old sh".
> >> It's a System V extension while earlier version only had getopt
> >> (which is available as external command).
> >
> >Excellent point. Upon further reflection, I see that my so-called Bourne
> >shell 'compatible' scripts aren't really. I should be using the external
> >getopt with the 'set -- `getopt`' idiom instead. I didn't realize I was
> >relying on a non-standard feature.
> >
> >Thanks for your time. I ended up learning something new about shell
> >programming.
>
> Wow.  Thanks for the reasonable response.  This issue has cropped up
> from time to time here and it always seems to revert to rancor.  I
> actually opened this message with some trepidation expecting some kind
> of "Well, it seems to me..." type of response.  Instead, this time we
> had a nice reasonable discussion.  Maybe that's because I didn't get
> involved until now.  :-)
>
> Anyway, in my usual arbitrary fashion, I think this deserves a gold star.
>
> I hope our intrepid gold star recorder is reading this.
> cgf

He is. ;-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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