[Gllug] hostname on CentOS

Russell Howe rhowe at siksai.co.uk
Fri Nov 11 16:42:15 UTC 2005


On Fri, Nov 11, 2005 at 11:53:04AM +0000, Tethys wrote:
> Even when using xargs, you should still append /dev/null to the end of
> the grep. Although xargs reduces the probabilty dramatically, it's still
> possible for grep to be passed a single filename in some circumstances,
> and hence the /dev/null is needed so you know in which file the match has
> been found:
> 
> 	find /etc -type f | xargs grep foo /dev/null

Or, as a further demonstration of the excessive feature-creep in GNU
tools:

grep -rinHsC1 --colour foo /etc

-- 
Russell Howe       | Why be just another cog in the machine,
rhowe at siksai.co.uk | when you can be the spanner in the works?
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list