Re: [PATCH v2] Remove useless uses of cat, and replace with filename arguments or redirection

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

 



Hi,

On Fri, 8 Jun 2007, Martin Langhoff wrote:

> On 6/7/07, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> > Things like that are known to happen, and that's why "wc -l < file" is a
> > better fix than "wc -l file | tr -dc 0-9". In this case, it might not
> > matter for a long time, but why not stop being sloppy here and now?
> 
> Not sure if I'd call is sloppy, but I also prefer wc -l < file -- it's
> definitely safer.

Okay, so I sounded harsher than intended.

I should have phrased it like that: I consider "wc -l < file" 
substantially more future-proof, and it is in general a good practice 
IMVHO not to generate something you throw away just after that, when there 
is a way to avoid generating the unwanted part consistently.

Sorry,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux