rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* how to 'getopts' in rc
@ 1991-09-05 19:02 malte
  1991-09-06 13:01 ` John Mackin
  0 siblings, 1 reply; 3+ messages in thread
From: malte @ 1991-09-05 19:02 UTC (permalink / raw)
  To: rc

In my dark past (sh) I frequently used "getopts", which is a sh builtin.
Nomen est omen, it can be used the same way as getopt(3).
Now using rc, the nice feature has vanished. So question is:

How would you do it in rc or should getopts be a rc builtin?


_______________________________________________________________________________
malte@techfak.uni-bielefeld.de

send mail to:	Universitaet Bielefeld, Technische Fakultaet
		z. Hd. Malte Uhl
		Postfach 8640
		4800 Bielefeld 1



^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: how to 'getopts' in rc
@ 1991-09-09 18:45 malte
  0 siblings, 0 replies; 3+ messages in thread
From: malte @ 1991-09-09 18:45 UTC (permalink / raw)
  To: rc

Today I read the first answers to my last letter on how to "getopts".
I like what John Mackin wrote, but I believe there ar two things to add:

	This is rc!  Why hamstring ourselves with old-style interfaces,

I agree with you that commandline conventions are probably not the ultimate
ones, but here at my site, there are lots of beginners and it won't make
things easier if we change that "old-style" interfaces.
And after all, I am quite comfortable with these. What says POSIX about it?

	* = ` { getopts opt1 'code1' opt2 'code2' ... - $* }

Also a good idea that didn't come to my mind! But I have lots of sh scripts
here which will occasionally be ported to rc. Your suggestion won't make
things easier.


_______________________________________________________________________________
malte@techfak.uni-bielefeld.de

send mail to:	Universitaet Bielefeld, Technische Fakultaet
		z. Hd. Malte Uhl
		Postfach 8640
		4800 Bielefeld 1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1991-09-09 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-09-05 19:02 how to 'getopts' in rc malte
1991-09-06 13:01 ` John Mackin
1991-09-09 18:45 malte

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 NNTP newsgroup(s).