8
9
10
11
12
13
14
15
16
17
|
if [[ $(screen -list | egrep 'Attached|Detached'|awk '{print $1}') == "" ]];then
# echo "No screen found for displaying to. Run \"screen\" in an xterm"
# exit 1
xterm -e screen &
sleep 1
fi
cmd="$*"
screen -X screen bash -c "$cmd;echo \"Press any key to continue, ^a <space> to see other windows\";bash -c 'read -n 1 -s'"
|
|
|
|
8
9
10
11
12
13
14
15
16
17
|
if [[ $(screen -list | egrep 'Attached|Detached'|awk '{print $1}') == "" ]];then
# echo "No screen found for displaying to. Run \"screen\" in an xterm"
# exit 1
xterm -e screen &
sleep 1
fi
cmd="cd $PWD;$*"
screen -X screen bash -c "$cmd;echo \"Press any key to continue, ctrl-a <space> to see other windows\";bash -c 'read -n 1 -s'"
|