From owner-cvs-all Fri Jun 14 11:18:50 2002 Delivered-To: cvs-all@freebsd.org Received: from glatton.cnchost.com (glatton.cnchost.com [207.155.248.47]) by hub.freebsd.org (Postfix) with ESMTP id 3FE9637B40D; Fri, 14 Jun 2002 11:18:46 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by glatton.cnchost.com id OAA04119; Fri, 14 Jun 2002 14:18:26 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200206141818.OAA04119@glatton.cnchost.com> To: Juli Mallett Cc: Akinori MUSHA , Trevor Johnson , Mikhail Teterin , Pete Fritchman , portmgr@FreeBSD.ORG, Maxim Sobolev , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: ports/Mk bsd.port.mk In-reply-to: Your message of "Fri, 14 Jun 2002 10:38:42 PDT." <20020614103842.A92261@FreeBSD.ORG> Date: Fri, 14 Jun 2002 11:18:24 -0700 From: Bakul Shah Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > 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