Gentoo Archives: gentoo-user

From: "Spider (D.m.D. Lj.)" <spider@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Simple command line stuff
Date: Tue, 11 Oct 2005 08:16:34
Message-Id: 1129018175.8410.2.camel@Darkmere.darkmere
In Reply to: Re: [gentoo-user] Simple command line stuff by Drew Tomlinson
1 On Tue, 2005-10-11 at 00:25 -0700, Drew Tomlinson wrote:
2 >
3 > Oh, and another thought. The "find" command can do this for you as
4 > well, IIRC.
5
6
7
8 find . -type f -iname '*.wav' -exec command "{}" "{}".foo \;
9
10 is the syntax, IIRC. Note the \ that exists to escape the
11 semicolon, therefore telling find to end processing.
12
13 find . -type f -iname '*.wav' |while read LIST; do command "${LIST}"
14 "${LIST/old/new}" ; done
15
16 is another possibility. Adding limiters to "find" can prevent it from
17 recursing too deeply.
18
19
20 //Spider
21
22 --
23 begin .signature
24 Tortured users / Laughing in pain
25 See Microsoft KB Article Q265230 for more information.
26 end

Attachments

File name MIME type
signature.asc application/pgp-signature