[plug] [Pipes]

James Devenish devenish at guild.uwa.edu.au
Tue Dec 7 16:43:31 WST 2004


In message <41B536C2.7060702 at tigris.org>
on Tue, Dec 07, 2004 at 12:51:14PM +0800, Timothy White wrote:
> I have a procmailrc file that runs a command when a certain email is 
> received and pipes the output to a command (e.g. ls ~/ | mail -s home user)
> Sometimes the command outputs stuff on stderr. How can I pipe both 
> stdout and stderr through the pipe?

This is known as 'redirection'. See shell manual. For instance:

ls ~/ 2>&1 | mail -s home user
or
ls ~/ |& mail -s home user

(stderr is descriptor '2' and stdout is descriptor '1'.)





More information about the plug mailing list