[Gllug] hostname on CentOS
Tethys
sta296 at astradyne.co.uk
Mon Nov 14 12:46:54 UTC 2005
Nix writes:
>Hence the /dev/null kludge (whose entire raison d'etre is to stop the
>command reading from stdin if no arguments are added) is unnecessary.
Not so (although it does that as well). The primary reason is to ensure
that grep prints the filename as well as the matching line. Without out
that, you're no wiser than you were before -- you know that *some* file
in /etc has the info you're looking for, but don't know which one. True,
with GNU grep, you can use the -H flag to force that, but GNU grep isn't
available everywhere. Using xargs means that the chances of grep *not*
printing the filename are slim... but the possibility is still there.
Tet
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list