Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!cca!johnl From: johnl@cca.UUCP Newsgroups: net.unix Subject: Re: creating pipes in find(1) - (nf) Message-ID: <425@ima.UUCP> Date: Wed, 3-Oct-84 23:42:40 EDT Article-I.D.: ima.425 Posted: Wed Oct 3 23:42:40 1984 Date-Received: Sat, 6-Oct-84 01:46:44 EDT Lines: 19 #R:sri-arpa:-1237800:ima:19700001:000:496 ima!johnl Oct 3 10:25:00 1984 > How do I build a pipe within the exec portion of find? > Example: > find /etc -name printcap -exec cat {} | lpr \; The short answer is that you can't -- find uses an exec() call to run what it runs, and exec won't create pipes. Any "|" characters are handled by the shell. In the Bourne shell, though, you can do stuff like this: find /etc -name foo - print | while read fn do cat $fn | lpr done I suppose that there's some way to do that in the C shell, too. John Levine, ima!johnl