I am trying to set up a simple logging structure in my shell scripts. For this, I would like to define a function "log", which can be called
log "LEVEL" $message
If the message is a variable, to which I previously redirected the outputs of the executed commands. My problem is that I get errors with the following
{message=command 2>&3 1>&3 3>&-} >&3
log "INFO" $message
Is there something wrong there?
TIA
source
share