Subject: Re: Strange cat behavior with directories
To: None <netbsd-help@NetBSD.ORG>
From: Christoph Badura <bad@ora.de>
List: netbsd-help
Date: 06/18/1998 16:33:09
root@garbled.net (Tim Rightnour) writes:
>I was fiddling around with something the other night, and did this:
>mkdir bob
>cp blah bob
>cat *>out
>At which point the machine just stood there.. ^C, and the file out was about
>2 megs!
>cat bob>out gives a 512 byte file.. so why when I do the *, does it make such a
>mess??
Well, "cat *>out" really is equivalent to "cat blah bob out > out" in
this case. And it is copying out onto itself.
>Is this a bug? should I send-pr it? Or is this "expected wierd behavior" and
>"dont do that"?
This used to be the expected behaviour, IIRC. But some versions of cat
complain about the output being an input.
Klaus?
--
Christoph Badura
Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code
http://www.peer-to-peer.com/