I have long commands to send to a detached screen
. I used :
screen -x screen-name -p 1 -X stuff 'mycommand\n'
As inspired by this related post. It works, but if mycommand
is very long I get the screen error :
remote control too long
I cannot cut the command in smalled bits. It is like:
( { script1.sh; script2.sh; } </dev/null &>/dev/null &)
with many scripts and mv
operations between the scripts.
So, how could I make screen
to accept these long command lines? Thanks for your help!