[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: incorrectly sorted file with snow leopard sort

From: Bob Proulx
Subject: Re: incorrectly sorted file with snow leopard sort
Date: Wed, 11 Nov 2009 13:37:50 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

Bauke Jan Douma wrote:
> Eric Blake wrote on 11/04/2009 02:59 AM:
>> Useless use of cat.
>> tr -d "\r" < list-of-groups-greetings.txt | sort
> Useless maybe, but then again maybe the user won some time
> by it. I often wind up with constructs like this.
> Many times, you do 'less /path/to/file', then right after you
> may want to run sed or grep on it, in which case I usually
> find it quicker to edit the previous command-line as little
> as I can, and just attach the grep or sed or whatever-command
> to it: 'less /path/to/file | grep regex'.
> An many times --this may be hurtful ;-)-- I wind up doing 'cat
> file' on too large a file, followed by a quick command-
> line edit that gives me: 'cat file | less'.
> Basically, I think I (my fingers?, my eyes?) have trouble
> getting to the '<'. I'm not a touch typist by any means.

I don't think anyone worries about anything written on the command
line.  If you are typing it and hitting enter then do whatever makes
sense to you.

The problem is that those command lines tend to make their way into
scripts.  It is in scripts that some of these constructs cause more
problems.  Doing character I/O can actually be quite CPU intensive.  I
have often benchmarked and found large optimizations there.  It does
keep those multicore processors busy! :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]