View Single Post
Old Feb 21st, 2007, 12:12 AM   #6
a thing
Unverified User
 
a thing's Avatar
 
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0 a thing is on a distinguished road
getopts isn't very powerful. Take a look at how prefix (specifically sections 2 through 4) parses arguments. If you want another example, look at fsize.

Note this system is imperfect. Most notibly it doesn't yet support non-option arguments that start with a hyphen. I'll get to this when I have time (a lot of stuff builds up to read after being away over a three day weekend...).

I should make a shell based off Bash that incorporates this system in a builtin...
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted.
Got 'Nux?—GNU/Linux and other free software support.
It's GNU/Linux, not just Linux.

Last edited by a thing; Feb 21st, 2007 at 12:31 AM.
a thing is offline   Reply With Quote