cleaner way to rename windows
This commit is contained in:
parent
f8cc3527d9
commit
79286bacb8
1 changed files with 5 additions and 5 deletions
10
superscreen
10
superscreen
|
@ -15,15 +15,15 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# main screen (physical host)
|
||||||
|
screen -d -m -S $session -t `hostname -s`
|
||||||
|
|
||||||
screen -d -m -S $session
|
# servers' screens : open a ssh connexion from the host to them, then rename it
|
||||||
screen -S $session -p $window -X exec printf "\033k%s\033\\" `hostname -s`
|
|
||||||
|
|
||||||
for server in $servers
|
for server in $servers
|
||||||
do
|
do
|
||||||
let window++
|
window=$(( window + 1 ))
|
||||||
screen -S $session -X screen ssh $server
|
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
|
done
|
||||||
|
|
||||||
screen -r $session -p 0
|
screen -r $session -p 0
|
||||||
|
|
Loading…
Reference in a new issue