page

Jul 5, 2019

Redirect stderr and stdout in Bash

https://stackoverflow.com/questions/637827/redirect-stderr-and-stdout-in-bash


You can redirect stderr to stdout and the stdout into a file:
some_command >file.log 2>&1 

To append file
echo "foo" 1>> bar.txt 2>&1 

No comments:

Post a Comment