LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: Andrew Burrow <alburrow@cs.adelaide.edu.au>
To : David Newall <davidn@rebel.net.au>
Date: Wed, 22 Nov 2000 12:31:35 +1030
Re: Scripts walking the tree
> > Or perhaps you have an example
> > of a shell script that can grep/sort/uniq/iterate over etc., lists of
> > files where some contain newlines. I have tried to no avail.
>
> find / -exec grep pattern {} \;
Bzzt. You just grepped the _contents_ of all files (including those
with newlines in the filename). "find" is great --- at avoiding the
issue of trying to send lists of filenames across a pipe. It can do
many of the things that you might need to build a pipeline for, but
the problem arises whenever the list of filenames is sent on for
further processing.
Now sort the output, where some of the filenames contain newlines.
Cheers,
Andrew
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page