Re: du doesn't take stdin
Richard Dawe <[email protected]> Sun, 14 Sep 2003 20:13:36 +0100
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hello.
Dan Heller wrote:
>
> Is this an oversight or omission?
> I want to do:
> $ locate .jpg | sed [...] | du -c -b
Why should du read a list of files on stdin?
You can use xargs to convert stdin to a list of parameters:
locate .jpg | sed [...] | xargs du -c -b
xargs comes with GNU findutils.
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]