grep is always recursive

Smoot Carl-Mitchell smoot at tic.com
Wed Jan 28 03:25:54 UTC 2009


On Tue, 2009-01-27 at 21:16 -0500, Matthew Flaschen wrote:

> Given the way the shell does expansion, and the way arguments are passed
> to C programs, how would you design get opt to eliminate this problem?
> I don't think it's possible to "fix" this in getopt (which is not used
> by all C programs anyway)

getopt should be used by almost all the CLI tools, except perhaps 'dd'
which has always been an outlier. :-)

BTW, the Perl Getopts module has the same problem.  So it is not just
the getopt library.  Personally, I do not think it is fixable in a
general way. This problem is a corner case IMHO.
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list