I am using the below code to run some commands and also log the output for a script.
#!/bin/bash exec 3>&1 4>&2 trap \'exec 2>&4 1>&am