From owner-svn-src-head@freebsd.org Tue Dec 5 16:55:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 982E4E70B8E; Tue, 5 Dec 2017 16:55:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF1A355A; Tue, 5 Dec 2017 16:55:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB5GtGQJ052406; Tue, 5 Dec 2017 08:55:16 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB5GtGTn052405; Tue, 5 Dec 2017 08:55:16 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712051655.vB5GtGTn052405@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: To: Pedro Giffuni Date: Tue, 5 Dec 2017 08:55:16 -0800 (PST) CC: Cy Schubert , Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Tue, 05 Dec 2017 17:12:45 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:55:20 -0000 [ Charset windows-1252 unsupported, converting... ] > > On 05/12/2017 11:29, Cy Schubert wrote: > > Why not update sed to create the backup file only if the suffix is > > given to -i, like gnu sed does. > > > > No, no .. there have been several failed attempts at that that cause > nasty side effects. > It is also a rather non-standardish thing to do. Yet we are okay with having sponge(1) and its nasty side effects? Someone please just ask for revision on this, and also make sure the top level .arclint file that got a bogus add of /test/ during the commit? The argument that Linux does this, and that this is a top answer in google do not hold water for me. Linux does lots of things, many are novieces solving novice problems cause they are not skilled. sponge(1), imho, as Devin points out is just not needed to solve this problem and has its own set of issues. The COST so far of this small amount of code on developers, again, IMHO, already far out weights any benifit of having it in base. > Pedro. > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > This old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > ------------------------------------------------------------------------ > > From: Devin Teske > > Sent: 05/12/2017 07:35 > > To: Hans Petter Selasky > > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; > > svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > > usr.bin/sponge/tests usr.bin/tee > > > > > > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > > > > > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > > >> Further more, why does freebsd need this in base? > > > > > > Hi, > > > > > > I think this is useful. It could replace the "-i " (intermediate) > > option for "sed" for example. It avoids creating temporary files when > > filtering files, right? > > > > > > --HPS > > > > > > > Wth is wrong with: > > > > data=$( sed -e '...' somefile ) && > > ????????????????????? echo "$data" > somefile > > > > or > > > > set -e > > data=... > > echo "$data" > ... > > > > or > > > > exec 3< > $( ... ) > > EOF > > cat > ... <&3 > > > > or > > > > (I digress) > > > > Infinite variations, but the gist is that sponge looks to be trying to > > help sh(1)/similar when help is unneeded. > > > > Why buffer data into memory via fork-exec-pipe to sponge when you can > > buffer to native namespace without pipe to sponge? > > > > Am I missing something? Why do we need sponge(1)? > > -- > > Devin > > > -- Rod Grimes rgrimes@freebsd.org