Another find'ism
ron.peterson at yellowbank.com
ron.peterson at yellowbank.com
Tue Jun 3 11:14:41 EDT 2003
On Tue, Jun 03, 2003 at 01:38:39PM +0000, John Chambers wrote:
> find . -type f | xargs grep -i "foo.*bar"
I'm going a little o.t., but here's a way to use 'find' if you want to
perform multiple operations on the results it returns. Not so easy to
do w/ find's -exec option. I was banging my head on this a little while
ago, so I thought I'd try to save someone else the frustration.
find /a/path <criteria> -print | while read FNAME; do echo ${FNAME}.xxx, ...; done
--
Ron Peterson -o)
87 Taylor Street /\\
Granby, MA 01033 _\_v
https://www.yellowbank.com/ ----
More information about the Discuss
mailing list