til/bash-scripting/redirecting-the-output-of-a-command-to-a-file.md

196 B

  1. Redirect stdout to one file and stderr to another file:
command > out 2>error
  1. Redirect stdout to a file out, and then redirect stderr to stdout:
command > out 2>&1