I would like to start screen detached session, but I want to evaluate some bash. It seems screen only supports an executable and binary. I want do do some magic like:
screen -d -m script.sh 2>&1 | tee logfile.log
but this apparently does not work. Quoting does not help here. The only idea I have is to create a wrapper script that will do this redirection and then to call it directly, like:
screen -d -m wrapper_script.sh
Any other ideas? Thanks.