pipes within a 'find' command

Suu Quan quan at hplabsc.UUCP
Sat Sep 27 06:52:56 AEST 1986


This command did not work :
find /usr/spool/eroff -print -exec tbl {} | eqn | eroff -ms \; -exec rm {} \;
                                   ^^^^^^^^^^^^^^^^^^^^^^^^
     The underlined pipe is to properly print a file.

Intention : scan all the files in directory /usr/spool/eroff
            print the file
            remove the file.

Problem : as is, the command does not work.
	I tried using "" quotes, I tried using escape character \, I tried
		using parentheses (), I tried a combination of them.
	Nothing works.

I finally resigned to do this :

find /usr/spool/eroff -print -exec shell_script {} \;

with the contents of the file 'shell_script' to be

	tbl $1 | eqm | eroff -ms; rm $1

Can somebody out there teach me how to use a pipe within a find
command. I hate to maintain another shell script.

			Suu Quan phone (415) 857-3594
			quan%hplabs at HPLABS.HP.COM
			!hpda!hplabsc!quan
-- 
Suu Quan phone (415) 857-3594
quan%hplabs at HPLABS.HP.COM
!hpda!hplabsc!quan



More information about the Comp.unix mailing list