[Toybox] [PATCH] grep: cleanup, add -Hs

Isaac idunham at lavabit.com
Sat Jul 20 08:29:49 PDT 2013


toybox uses xexit and error_exit instead of the standard C approach; this
allows toys to be called without starting a new process.
toys.exitval is the return value on exit.
loopfiles will read from stdin if nothing is specified.
POSIX specifies that grep shall by default print the line when only one 
input is specified. This can be handled by pretending we got -h 
if there are not multiple files.
-s is equivalent to setting failok in loopfiles_rw.

--
HTH,
Isaac Dunham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grep-long.diff
Type: text/x-diff
Size: 2670 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130720/5b0c1319/attachment-0007.diff>


More information about the Toybox mailing list