Monday, June 13, 2005

Redirections in Bash

command > filename 2>&1
directs both standard output and standard error to the file filename

command 2>&1 > filename
directs only the standard output to file, filename because the standard error was duplicated as standard output before the standard output was redirected

No comments: