All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Poole <mdpoole@troilus.org>
To: Stephen Rothwell <git@ozlabs.org>
Cc: Josh Triplett <josh@freedesktop.org>, git@vger.kernel.org
Subject: Re: [PATCH] Remove useless uses of cat, and replace with filename arguments or redirection
Date: Tue, 05 Jun 2007 23:51:52 -0400	[thread overview]
Message-ID: <87sl957naf.fsf@graviton.dyn.troilus.org> (raw)
In-Reply-To: <20070606133915.d72e4afe.git@ozlabs.org> (Stephen Rothwell's message of "Wed\, 6 Jun 2007 13\:39\:15 +1000")

Stephen Rothwell writes:

> On Tue, 05 Jun 2007 18:34:59 -0700 Josh Triplett <josh@freedesktop.org> wrote:
>>
>> -commits=$(cat ../revs | wc -l | tr -d " ")
>> +commits=$(wc -l ../revs | tr -d " ")
>
> This is not equivalent, you probably wanted:
>
> commits=$(wc -l <../revs | tr -d " ")

Which relevant version(s) of wc do not accept filename arguments?
POSIX[1] seems to specify it.  Or do you mean that there is some
subtle difference in its processing of stdin vs specified files?

[1]- http://www.opengroup.org/onlinepubs/000095399/utilities/wc.html

Michael Poole

  reply	other threads:[~2007-06-06  3:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06  1:34 [PATCH] Remove useless uses of cat, and replace with filename arguments or redirection Josh Triplett
2007-06-06  3:39 ` Stephen Rothwell
2007-06-06  3:51   ` Michael Poole [this message]
2007-06-06  3:58     ` Martin Langhoff
2007-06-06  4:54       ` Stephen Rothwell
2007-06-06  6:38         ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sl957naf.fsf@graviton.dyn.troilus.org \
    --to=mdpoole@troilus.org \
    --cc=git@ozlabs.org \
    --cc=git@vger.kernel.org \
    --cc=josh@freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.