I have the following in my bash script:
# catch input for log-data
exec > >(tee -i ${LOG})
exec 2>&1
I want to exclude one command from being written to this log file, but the following doesn't work:
/sbin/runuser -l USER -c 'COMMAND' >/dev/null 2>&1
It always gets logged to the ${LOG}
file.
How can I prevent this?