Skip to content

Instantly share code, notes, and snippets.

@eczn
Last active January 9, 2023 03:06
Show Gist options
  • Save eczn/8aa31a6077691094e53813fcea1507ff to your computer and use it in GitHub Desktop.
Save eczn/8aa31a6077691094e53813fcea1507ff to your computer and use it in GitHub Desktop.
output stdout & stderr to one file
echo 'hello' > ./a.log 2>&1 # merge stdout & stderr and redirect it to a.log
echo "$?" # outout the process exitCode of last executed command (L1's exitCode in this case)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment