[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sorting screens
From: |
Pieter Luteijn |
Subject: |
Re: sorting screens |
Date: |
Tue, 24 Apr 2007 20:03:41 +0200 (CEST) |
User-agent: |
SquirrelMail/1.4.8 |
>
>> 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
- sorting screens, Aleksey Tsalolikhin, 2007/04/19
- Re: sorting screens,
Pieter Luteijn <=