Geraint Edwards wrote:screen -p $zahl -X eval 'stuff ./run_node.sh" $zahl \015"'When looking into the screen window it seems that now only the first part './run_node.sh' is executed without passing the parameter.This is a quoting problem - single-quotes are not interpolated.That means: the argument (to the screen command) that is in '...' will not be scanned by the shell (script) for variables (etc) - and will appear empty in this case (since $zahl is not in your environment, perhaps). You need to do something like the following (to get the variable back out of the quoting, so that it will be interpolated): screen -p $zahl -X eval 'stuff ./run_node.sh" '$zahl' \015"' or, for more general such scenarios, a more bullet-proof version would be: screen -p $zahl -X eval 'stuff ./run_node.sh" '"$zahl"' \015"' Hello Geraint, Great! It worked. Thank you for your quick solution. I hope I can use this also on other platforms (solaris). What I would also know is why the second solution b) screen -p 1101 -X exec ./run_node.sh 1101 did not work out. It seemed more straightforward to me. Are there some limitations of the exec command using preliminary window selection? Regards Peter |
_______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users