creating pipes in find(1)

tcs%usna.uucp at BRL-BMD.ARPA tcs%usna.uucp at BRL-BMD.ARPA
Wed Sep 26 04:51:16 AEST 1984


How do I build a pipe within the exec portion of find?
Example:
	find /etc -name printcap -exec cat {} | lpr \;

I've tried lots of combinations of escaped parens, exec'ing
the shell, etc and nothing works.
I have gotten this to work:
	find /tmp -name tobuy -exec junk1 {} \;

junk1:
	cat $1 | more

But I'd rather know how to do it without having another file
lying around.

If it can be done, please explain the combination of
escapes, etc you use make it work.  Thanks.
	-tcs
	Terry Slattery	  U.S. Naval Academy	301-267-4413
	ARPA: tcs at brl-bmd     UUCP: decvax!brl-bmd!usna!tcs



More information about the Comp.unix mailing list