[plug] Pipe's

Craig Ringer craig at postnewspapers.com.au
Tue Dec 7 17:03:51 WST 2004


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?

Redirect stderr to stdout. Assuming bash:

${COMMAND} 2>&1 | ${COMMAND2}

--
Craig Ringer



More information about the plug mailing list