Subject: Re: Strange cat behavior with directories
To: netbsd-help <netbsd-help@NetBSD.ORG>
From: Igor <hibitek@globalserve.net>
List: netbsd-help
Date: 06/18/1998 15:18:28
This is a cryptographically signed message in MIME format.

--------------ms9824DD26F6961AF7425D0C4B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I had problems with my email earlier, and I just wish my last message to go out. I think
it's time we start cracking down on saboteurs in today's computer industry!

Igor wrote:

> This is not platform related behaviour! The platforms on which this works should be
> considered "anti-unix" or buggy.
>
> Igor wrote:
>
> > Try {{ cat * >/some/other/dir }}, cat is reading the file which it creates for
> > output. That causes it to be confused
> >
> > Christoph Badura wrote:
> >
> > > 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/



--------------ms9824DD26F6961AF7425D0C4B
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIILGAYJKoZIhvcNAQcCoIILCTCCCwUCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
CRAwggRaMIIDw6ADAgECAhBEQV9l9552QmCTlbeOw2HcMA0GCSqGSIb3DQEBBAUAMGIxETAP
BgNVBAcTCE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