[clug] Another esoteric question...

Peter Barker pbarker at barker.dropbear.id.au
Mon Nov 24 07:20:05 GMT 2008

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

Peter Barker                          |   Programmer,Sysadmin,Geek.
pbarker at barker.dropbear.id.au	      |   You need a bigger hammer.
:: It's a hack! Expect underscores! - Nigel Williams

More information about the linux mailing list