[RULE] Need help with scripting Vacuum

Geoff Burling llywrch at agora.rdrop.com
Wed Dec 11 20:14:34 EET 2002


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



_______________________________________________
Original home page of the RULE project: www.rule-project.org
Original Rule Development Site http://savannah.gnu.org/projects/rule/
Original RULE mailing list: Rule-list at nongnu.org, hosted at http://mail.nongnu.org/mailman/listinfo/rule-list




This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here