[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#469525: coreutils: [wc] RFC: Add option --no-filename
From: |
Pádraig Brady |
Subject: |
Re: Bug#469525: coreutils: [wc] RFC: Add option --no-filename |
Date: |
Thu, 6 Mar 2008 09:38:08 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Jari Aalto wrote:
> Package: coreutils
> Version: 6.10-3
> Severity: wishlist
>
>
> Description:
>
> $ wc -l README
> 200 README
>
> This is fine for interactive use, but not convenient in shell scripts,
Options are bad because of the extra complexity presented to users.
Currently wc only suppresses the "total" if only one file is passed.
I wonder could we go one step further and suppress the filename
also like grep does when passed a single file?
Note existing scripts that do the following would continue to work:
lines=`wc -l file | cut -d ' ' -f1`
It's probably safer though to not change the current operation,
considering that the functionality can be satisfied using the above,
or the following:
lines=`wc -l <file`
Pádraig.