My colleague Day Barr found this very useful Stack Overflow article. It shows how to redirect stdout to a log file from with a bash script. This is very useful if you’re debugging an existing bash script and don’t want to add a redirect to every line in it.
Copyright (c) 2024 Michel Hollands