Bash - Redirect both standard output and standard error to same file
Last Updated on Saturday, 05 March 2011 18:58 Saturday, 05 March 2011 18:56
Here are two ways on who to redirect both standard output and standard error to same file in bash. First the official a recommended way:
printf '%s\n%\n' "Hello bash" > FILE 2>&1
now easier unofficial way:
printf '%s\n%\n' "Hello bash" &> FILE















