> >> Hi. When I have multiple named screen windows, is there a way to sort >> them >> alphabetically? > > This is a longtime wish of mine as well .. > > -- > jean . .. .... //\\\oo///\\ >
This is probably why people have been looking for a nice way to dump the windowlist to STDOUT (search archives..) Then you can do something useful with it, like filtering it through sort -k 2 | sed -e "s/^[ 0-9]\+ //" -e "s/ \+[^ ]\+$//" | sed -e "s/^/screen -p \"/" -e "s/$/\" -X number /" and then feeding that to win=0 while read almost_finished_command do eval $almost_finished_command $win win=`expr $win + 1` done (sort on the window titles, replace the irrelevant information around the titles (current window number, flags; this could be different for a different windowlist string...) with re-numbering commands, then add the actual numbers in a second pass and execute the commands) You can still use this (or something slightly better looking) to sort the windows if you have some way to capture the output of windowlist (e.g. cut and paste it with the mouse if your terminal emulator can do this) Pieter _______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
