Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save idoru/613840 to your computer and use it in GitHub Desktop.
Save idoru/613840 to your computer and use it in GitHub Desktop.
send stdout and stderr to files but also still output stdout and stderr
(ruby -e 'STDERR.puts("stderr output") ; STDOUT.puts("stdout output") ' | tee -a stdout_logfile.txt) 3>&1 1>&2 2>&3 | tee -a stderr_logfile.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment