Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another find'ism



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/   ---- 




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org