Jeff Keasler <ke*****@llnl.govwrote:
In a scripting environment, I often want to strip some of the command
line options off the argument list, and then pass the remaining
options to another module that is deeper in the tool chain.
The difficulty is that you can't do an accurate parse without knowing
which options take arguments. For example, what are the options here?
foo -xyzzy -abcdef -ghi -ghi -g -hi
Well, `-z', `-f' and `-g' take arguments; the `-g' argument is
optional. So the correct options to pass along are
-x -y -zzy -a -b -c -d -e -f-ghi -ghi -g -h -i
Not so obvious, is it? ;-)
-- [mdw]