Hi
I got tired of having to type alot or cut'n'paste all the screens
listed using
screen -ls
So i made a small bash script that does that semiautomaticaly.
It parses the output from screen -ls and attaches to each screen one
by one. To get to the next one just deatach using normal C-a d
Just before entering the screen session, it tells you which command that
screen session is running. 2 seconds later the script enters the screen
session. It is safe to press ctrl+c at this moment since i use a
sleep 2.
After using it for some time i figured that i got rid of all the bugs
and that
others might like it. I call it allscreens and the script is naturaly
under the
same GPL as screen is.
#!/bin/bash
for window in $(screen -list | grep "(.*)" | cut -d"." -f1 | sed -e
"s/\t//g"); do
childpid=$(pstree -p -A $window | sed -e "s/.*---//" | sed -e "s/.*
(//" | sed "s/)$//")
childtxt=$(ps $childpid | cut -b 28-)
echo $childtxt
sleep 2
screen -r $window
done
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users