Home

How to log all lines from a bash screipt

Gunar Gessner

Gunar Gessner

Feb 8, 2021

# Display commands issued and exit script on first error
set -xe
# Log commands, stdout, and stderr to LOG_FILE
exec 3>&1 1>>${LOG_FILE} 2>&1

Sign up for the newsletter


Read other stuff