cachaito
4/25/2019 - 5:34 PM

Print terminal to file

Redirect and write log to file
yarn run file.js > output.log

Redirect and write both stdout and stderr to file
yarn run file.js &> output.log

Special case when &>> doesn't work
yarn run ts file_1.js &> ./output.log && yarn run ts file_2.js >> ./output.log 2>&1