On Tuesday 15 January 2008, [EMAIL PROTECTED] wrote:
> > what were you expecting to happen ? it is not possible for cat to
> > re-read stdin once it has consumed it.
>
> Yes, but you don't document it I bet. At least not in the path that
> starts with man cat.
>
> Just reading the coreutils docs, one wouldn't know why
> $ date|cat q b - c q - q - b
> worked except stdin only showed up once...
> Hmmm maybe also some pipes would also...

this isnt a cat/coreutils/stdin specific issue.  *any* program that consumes a 
read-destructive source would have the same "problem".  at the basic level, 
cat is functioning correctly: you told it to read from stdin as much as it 
could and that is exactly what cat did.  the fact that stdin was empty after 
the first time means you got no output the second+ time around.  you could 
make the same argument that if you wrote to a fifo and tried to cat it 
multiple times, cat was "misbehaving".
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to