How to Pipe standard error (STDERR) to another program

Everybody who has a little knowledge in linux shell know about piping and redirection. Piping is done by ‘|’ sign and for redirection ‘>’, ‘<’, ‘<<’, ‘>>’, ‘<<<’ signs are used.To redirect standard output of a program to a file we use
% foo > bar.txt
or
% foo 1> bar.txt
To redirect standard error of a program to [...]

Also tagged , , , , ,