Date: Fri, 14 Jun 2002 11:18:24 -0700 From: Bakul Shah <bakul@bitblocks.com> To: Juli Mallett <jmallett@FreeBSD.ORG> Cc: Akinori MUSHA <knu@iDaemons.org>, Trevor Johnson <trevor@jpj.net>, Mikhail Teterin <mi+mx@aldan.algebra.com>, Pete Fritchman <petef@absolutbsd.org>, portmgr@FreeBSD.ORG, Maxim Sobolev <sobomax@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: ports/Mk bsd.port.mk Message-ID: <200206141818.OAA04119@glatton.cnchost.com> In-Reply-To: Your message of "Fri, 14 Jun 2002 10:38:42 PDT." <20020614103842.A92261@FreeBSD.ORG>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > sed 's/foo/bar/;s/blah/bleh/' file | tee file > /dev/null > > > > Surely that'll work, but it has to be a single command to be used in > > the ports infrastructure, no? This will surely _not_ work for large files and may not work _at all_. The beauty of the pipes is that proper data flow occurs regardless of which command in the pipeline starts up first. So there are *no* guarantees that sed will start up first and read the entire input file before tee gets a chance to clobber it. In fact, tee may clobber 'file' before sed gets even a chance to read it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206141818.OAA04119>