Automatically cycling through screen(1) screens
offers the -t option to switch to the display after a given
number of cycles. I'd love to have something similar in
screen(1), but couldn't find it from a brief RoTFM.
As a result, I came up with the following line, which -- when
ran inside a screen(1) session -- skips through screens 0 to
sh -c 'n=0; while true ; do echo n=$n ; screen -x -X select $n ; \
n=`expr $n + 1`; if [ $n = 4 ]; then n=0; fi ; sleep 5 ; done'
This assumes that there are four screen sessions running.
Determining the number of screen sessions actually running
as well as skipping the one running this code is left as
an exercise to the reader.
If anyone has a better solution, I'd love to hear about it! :)
[Tags: screen, systat]