[clug] Another esoteric question...

Nemo wombat at nemo.house.cx
Mon Nov 24 12:09:39 GMT 2008

Depends on your screen config... according to my (debian) /etc/screenrc:

# define a bigger scrollback, default is 100 lines
defscrollback 1024

(I define it as 4096 in my personal .screenrc though.

Regarding the "shell *could* keep it in memory" ... "memory is 
expensive" comment? I'm sure that was said once about scrollback and 
command history...

Personally, I think it's a good idea. Make it definable and keep the 
last X number of command outputs in memory (up to Y KB max?), as 
accessible via some method. Details can be left to shell junkies (to be 
honest, I don't think I'd use it, but I can certainly see it being 
usable and, IMHO, for the memory consumption used, this is pretty minor.


Michael Cohen wrote:
> Of course if you are running from within screen you could just press
> ctrl-a escape to enter copy scrollback mode where you can highlight
> the output and place it into a file to run sort of etc. Screen scrolls
> back quite a long way and can hold quite a lot of output.
> Michael.
> On Mon, Nov 24, 2008 at 6:20 PM, Peter Barker
> <pbarker at barker.dropbear.id.au> wrote:
>> On Mon, 24 Nov 2008, Andrew Janke wrote:
>>> It then outputs the result and I realise I wanted it sorted on the
>>> second column.
>> The major problem is that the shell doesn't know ahead of time you want that
>> data.  It's probably not reasonable for the shell to keep stuff around on
>> spec; the output of a command is effectively unlimited, after all.  The
>> shell *could* keep it in memory - but 99% of the time it will be unused, and
>> memory is expensive.  It could keep it on disk - but hard disk is expensive
>> (time-wise ;)
>>> Then I have to make a choice, run it all again and add the '| sort' to
>>> the end or
>>> copy and paste it into a file and just run sort on that.
>> Well.... dare I say it... you could just run the shell from within emacs :-)
>>  That's basically your copy-paste solution, but at least you're already in
>> something which is *good* at that!
>>> Andrew Janke
>> yours,
>> --
>> Peter Barker                          |   Programmer,Sysadmin,Geek.
>> pbarker at barker.dropbear.id.au         |   You need a bigger hammer.
>> :: It's a hack! Expect underscores! - Nigel Williams
>> --
>> linux mailing list
>> linux at lists.samba.org
>> https://lists.samba.org/mailman/listinfo/linux

More information about the linux mailing list