Posts Tagged ‘pipe’

Say you’ve got a shell script which outputs a bunch of text with some parts colored, such as a regression testing system that colors failures in red and passes in green. The output from this is too big for one screen, so you pipe it through less, which strips away the colors. What you want […]

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 […]

CVS is annoying in that if you want to find out which files have been modified or need updating, you can’t simply use the cvs status command as there’s too much information displayed. In order to make it useful, you really need to filter the output. Note: the following tutorial only works for linux computers […]