rule-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RULE] Need help with scripting Vacuum


From: Geoff Burling
Subject: Re: [RULE] Need help with scripting Vacuum
Date: Wed, 11 Dec 2002 10:14:34 -0800 (PST)

On Mon, 9 Dec 2002, Eugene Wong wrote:

> A few days ago, I reached the point, where I should start adding code to
> deal with options. I'm wondering how to go about doing it. I noticed that
> the Advance Bash Scripting Guide tells everybody how to go about dealing
> with portions of the arguement in chapter 9, but it doesn't really give any
> good theory.
>
> For single letter options, I seem to notice that they usually begin with 1
> dash, & most often seem to allow "-abc" or "-a -b -c". Do we want to allow
> users to use the latter form? If I understand correctly, it would take a lot
> more code to deal with both. Since we want to allow both "-e" & "--empty",
> then there would be more parsing anyways.
>
> What's the best way of dealing with options? Using "shift"?
>
Have you looked at ``getopt"? That may be what you're looking for. I've
toyed with it once or twice, but the examples included in the documentation
aren't very good.

Geoff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]