How to write stdout both to the terminal and a file
Estimated 1 minute readย ยทย Wednesday, 4 May 2022
Below I use the tee command to write the output of an npm run build
script to both to the terminal and to a log file.
npm run build | tee ./logs/build.log