cleaner way to rename windows

This commit is contained in:
n 2015-09-10 22:02:26 +02:00
parent f8cc3527d9
commit 79286bacb8
1 changed files with 5 additions and 5 deletions

View File

@ -15,15 +15,15 @@ then
exit 1
fi
# main screen (physical host)
screen -d -m -S $session -t `hostname -s`
screen -d -m -S $session
screen -S $session -p $window -X exec printf "\033k%s\033\\" `hostname -s`
# servers' screens : open a ssh connexion from the host to them, then rename it
for server in $servers
do
let window++
window=$(( window + 1 ))
screen -S $session -X screen ssh $server
screen -S $session -p $window -X exec printf "\033k%s\033\\" $server
screen -S $session -p $window -X title $server
done
screen -r $session -p 0