1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/sh # part of even-more-utils, version #VERSION# # iterate `screen -r` through all screen sessions for s in $( screen -list "$@" \ | sed ' s/^\s\+\(\S\+\)\s.*$/\1/ t d ' ); do screen -r "$s" done