*BSD News Article 83326


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!ames!enews.sgi.com!news.sgi.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!portc02.blue.aol.com!howland.erols.net!feed1.news.erols.com!uunet!in2.uu.net!news1.iamerica.net!xavier.varmm.com!not-for-mail
From: AJ Musgrove <musgrove@xavier.varmm.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: cat foo* > foo.bar    causes infinite loop
Date: 20 Nov 1996 16:25:59 GMT
Organization: A poorly-installed InterNetNews site
Lines: 24
Message-ID: <56vben$k8j@news1.iamerica.net>
References: <328A1236.32C4@pilot.msu.edu>
NNTP-Posting-Host: 206.81.50.10
X-Newsreader: TIN [UNIX 1.3 unoff BETA release 960917]

Ed Symanzik <zik@pilot.msu.edu> wrote:
: If I create three files foo1, foo2, and foo3 then run the command

:  cat foo* > foo.bar

: in csh I get an infinite loop (at least until the partition fills up).
: Seems to me that '*' should be evaluated before new files are created.
: I have seen systems that don't behave this way give errors similar to
: "can't open foo.bar for both input and output".

I don't have a FreeBSD system here (its at home), but I just tried that on a
Solaris box, and it worked exactly as it should. The contents of foo1, foo2,
and foo3 where cat'ed into foo.bar

Sounds like a bug in the shell to me.

-- 
AJ Musgrove

----------------------------------------------------------------
My opinions do not necessarily reflect those of my employer, or 
anyone else for that matter. O-
----------------------------------------------------------------