Posts Tagged ‘cerr’

Piping stderr in unix

Posted: 26th May 2011 by Tim in Bash, Ubuntu
Tags: , , , , , , , , ,

In unix, you can pass output from one program to another using the pipe symbol (|). Unfortunately, it only pipes the output from stdout (cout). You can pass the output from both stdout and stderr (cerr) by adding 2>&1 to the end of the command before the pipe, where 1 is the file descriptor for […]