diff --git a/bash-scripting/redirecting-the-output-of-a-command-to-a-file.md b/bash-scripting/redirecting-the-output-of-a-command-to-a-file.md new file mode 100644 index 0000000..a171020 --- /dev/null +++ b/bash-scripting/redirecting-the-output-of-a-command-to-a-file.md @@ -0,0 +1,8 @@ +1. Redirect stdout to one file and stderr to another file: + + command > out 2>error + +2. Redirect stdout to a file `out`, and then redirect stderr to stdout: + + command > out 2>&1 +