Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Dec 2017 20:19:47 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Pedro Giffuni <pfg@FreeBSD.org>
Cc:        Cy Schubert <Cy.Schubert@komquats.com>, Devin Teske <devin@shxd.cx>, Hans Petter Selasky <hps@selasky.org>, "rgrimes@freebsd.org" <rgrimes@freebsd.org>, "cem@freebsd.org" <cem@freebsd.org>, Eitan Adler <eadler@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee
Message-ID:  <201712060419.vB64JldG068350@slippy.cwsent.com>
In-Reply-To: Message from Pedro Giffuni <pfg@FreeBSD.org> of "Tue, 05 Dec 2017 20:01:46 -0500." <4FE900E7-10E6-4909-BB4A-C5E6F83FF515@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks.

It doesn't matter anyway FreeBSD sed -i '' == gsed -i <with no argument>.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.


In message <4FE900E7-10E6-4909-BB4A-C5E6F83FF515@FreeBSD.org>, Pedro 
Giffuni wr
ites:
> 
>
> --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain;
> 	charset=utf-8
>
> Hello;
>
> > On Dec 5, 2017, at 12:17, Cy Schubert <Cy.Schubert@komquats.com> =
> wrote:
> >=20
> > What side effects? Can you give one or two examples, please?
> >=20
>
> Sorry, I forgot the details .. but I am pretty sure there was exp-run =
> and breakage in the ports tree.
>
> Pedro.
>
> > ---
> > Sent using a tiny phone keyboard.
> > Apologies for any typos and autocorrect.
> > This old phone only supports top post. Apologies.
> >=20
> > Cy Schubert
> > <Cy.Schubert@cschubert.com> or <cy@freebsd.org>
> > The need of the many outweighs the greed of the few.
> > ---
> > From: Pedro Giffuni
> > Sent: 05/12/2017 08:40
> > To: Cy Schubert; Devin Teske; 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/spongeusr.bin/sponge/tests usr.bin/tee
> >=20
> >=20
> > 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.
> >>=20
> >=20
> > 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.
> >=20
> > Pedro.
> >=20
> >> ---
> >> Sent using a tiny phone keyboard.
> >> Apologies for any typos and autocorrect.
> >> This old phone only supports top post. Apologies.
> >>=20
> >> Cy Schubert
> >> <Cy.Schubert@cschubert.com> <mailto:Cy.Schubert@cschubert.com> or =
> <cy@freebsd.org> <mailto:cy@freebsd.org>
> >> 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 <mailto:rgrimes@freebsd.org>; cem@freebsd.org =
> <mailto:cem@freebsd.org>; Eitan Adler; src-committers; =
> svn-src-all@freebsd.org <mailto:svn-src-all@freebsd.org>; =
> svn-src-head@freebsd.org <mailto:svn-src-head@freebsd.org>
> >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge =
> usr.bin/sponge/tests usr.bin/tee
> >>=20
> >>=20
> >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky <hps@selasky.org> =
> <mailto:hps@selasky.org> wrote:
> >> >=20
> >> >> On 12/05/17 13:58, Rodney W. Grimes wrote:
> >> >> Further more, why does freebsd need this in base?
> >> >=20
> >> > Hi,
> >> >=20
> >> > 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?
> >> >=20
> >> > --HPS
> >> >=20
> >>=20
> >> Wth is wrong with:
> >>=20
> >> data=3D$( sed -e '...' somefile ) &&
> >> =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=
> =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD echo "$data" > =
> somefile
> >>=20
> >> or
> >>=20
> >> set -e
> >> data=3D...
> >> echo "$data" > ...
> >>=20
> >> or
> >>=20
> >> exec 3<<EOF
> >> $( ... )
> >> EOF
> >> cat > ... <&3
> >>=20
> >> or
> >>=20
> >> (I digress)
> >>=20
> >> Infinite variations, but the gist is that sponge looks to be trying =
> to help sh(1)/similar when help is unneeded.
> >>=20
> >> Why buffer data into memory via fork-exec-pipe to sponge when you can =
> buffer to native namespace without pipe to sponge?
> >>=20
> >> Am I missing something? Why do we need sponge(1)?
> >> --=20
> >> Devin
> >>=20
> >=20
>
>
> --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/html;
> 	charset=utf-8
>
> <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
> charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
> -webkit-nbsp-mode: space; line-break: after-white-space;" =
> class=3D"">Hello;<br class=3D""><div><br class=3D""><blockquote =
> type=3D"cite" class=3D""><div class=3D"">On Dec 5, 2017, at 12:17, Cy =
> Schubert &lt;<a href=3D"mailto:Cy.Schubert@komquats.com" =
> class=3D"">Cy.Schubert@komquats.com</a>&gt; wrote:</div><br =
> class=3D"Apple-interchange-newline"><div class=3D"">
>     <meta content=3D"text/html;=0D
>       charset=3Dwindows-1252" http-equiv=3D"Content-Type" class=3D"">
>  =20
>   <div bgcolor=3D"#ffffff" text=3D"#000000" class=3D""><div =
> class=3D""><div style=3D"font-family: Calibri,sans-serif; font-size: =
> 11pt;" class=3D"">What side effects? Can you give one or two examples, =
> please?<br class=3D""><br =
> class=3D""></div></div></div></div></blockquote><div><br =
> class=3D""></div>Sorry, I forgot the details .. but I am pretty sure =
> there was exp-run and breakage in the ports tree.</div><div><br =
> class=3D""></div><div>Pedro.</div><div><br class=3D""><blockquote =
> type=3D"cite" class=3D""><div class=3D""><div bgcolor=3D"#ffffff" =
> text=3D"#000000" class=3D""><div class=3D""><div style=3D"font-family: =
> Calibri,sans-serif; font-size: 11pt;" class=3D"">---<br class=3D"">Sent =
> using a tiny phone keyboard.<br class=3D"">Apologies for any typos and =
> autocorrect.<br class=3D"">This old phone only supports top post. =
> Apologies.<br class=3D""><br class=3D"">Cy Schubert<br class=3D"">&lt;<a =
> href=3D"mailto:Cy.Schubert@cschubert.com" =
> class=3D"">Cy.Schubert@cschubert.com</a>&gt; or &lt;<a =
> href=3D"mailto:cy@freebsd.org" class=3D"">cy@freebsd.org</a>&gt;<br =
> class=3D"">The need of the many outweighs the greed of the few.<br =
> class=3D"">---<br class=3D""></div></div><hr class=3D""><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: =
> bold;" class=3D"">From: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D"">Pedro Giffuni</span><br =
> class=3D""><span style=3D"font-family: Tahoma,sans-serif; font-size: =
> 10pt; font-weight: bold;" class=3D"">Sent: </span><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;" =
> class=3D"">05/12/2017 08:40</span><br class=3D""><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: =
> bold;" class=3D"">To: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D"">Cy Schubert; Devin =
> Teske; Hans Petter Selasky</span><br class=3D""><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: =
> bold;" class=3D"">Cc: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D""><a =
> href=3D"mailto:rgrimes@freebsd.org" class=3D"">rgrimes@freebsd.org</a>; =
> <a href=3D"mailto:cem@freebsd.org" class=3D"">cem@freebsd.org</a>; Eitan =
> Adler; src-committers; <a href=3D"mailto:svn-src-all@freebsd.org" =
> class=3D"">svn-src-all@freebsd.org</a>; <a =
> href=3D"mailto:svn-src-head@freebsd.org" =
> class=3D"">svn-src-head@freebsd.org</a></span><br class=3D""><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: =
> bold;" class=3D"">Subject: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D"">Re: svn commit: r326554 =
> - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee</span><br =
> class=3D""><br class=3D""><p class=3D""><br class=3D"">
>     </p>
>     <div class=3D"moz-cite-prefix">On 05/12/2017 11:29, Cy Schubert =
> wrote:<br class=3D"">
>     </div>
>     <blockquote cite=3D"mid:20171205162926.9F16C1DD@spqr.komquats.com" =
> type=3D"cite" class=3D"">
>      =20
>       <div class=3D"">
>         <div style=3D"font-family: Calibri,sans-serif; font-size: 11pt;" =
> class=3D"">Why
>           not update sed to create the backup file only if the suffix is
>           given to -i, like gnu sed does.<br class=3D"">
>           <br class=3D"">
>         </div>
>       </div>
>     </blockquote>
>     <br class=3D"">
>     No, no .. there have been several failed attempts at that that cause
>     nasty side effects.<br class=3D"">
>     It is also a rather non-standardish thing to do.<br class=3D"">
>     <br class=3D"">
>     Pedro.<br class=3D"">
>     <br class=3D"">
>     <blockquote cite=3D"mid:20171205162926.9F16C1DD@spqr.komquats.com" =
> type=3D"cite" class=3D"">
>       <div class=3D"">
>         <div style=3D"font-family: Calibri,sans-serif; font-size: 11pt;" =
> class=3D"">---<br class=3D"">
>           Sent using a tiny phone keyboard.<br class=3D"">
>           Apologies for any typos and autocorrect.<br class=3D"">
>           This old phone only supports top post. Apologies.<br class=3D"">=
>
>           <br class=3D"">
>           Cy Schubert<br class=3D"">
>           <a class=3D"moz-txt-link-rfc2396E" =
> href=3D"mailto:Cy.Schubert@cschubert.com">&lt;Cy.Schubert@cschubert.com&gt=
> ;</a> or <a class=3D"moz-txt-link-rfc2396E" =
> href=3D"mailto:cy@freebsd.org">&lt;cy@freebsd.org&gt;</a><br class=3D"">
>           The need of the many outweighs the greed of the few.<br =
> class=3D"">
>           ---<br class=3D"">
>         </div>
>       </div>
>       <hr class=3D""><span style=3D"font-family: Tahoma,sans-serif; =
> font-size: 10pt; font-weight: bold;" class=3D"">From: </span><span =
> style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;" =
> class=3D"">Devin Teske</span><br class=3D"">
>       <span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
> font-weight: bold;" class=3D"">Sent: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D"">05/12/2017 =
> 07:35</span><br class=3D"">
>       <span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
> font-weight: bold;" class=3D"">To: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D"">Hans Petter =
> Selasky</span><br class=3D"">
>       <span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
> font-weight: bold;" class=3D"">Cc: </span><span style=3D"font-family: =
> Tahoma,sans-serif; font-size: 10pt;" class=3D""><a =
> class=3D"moz-txt-link-abbreviated" =
> href=3D"mailto:rgrimes@freebsd.org">rgrimes@freebsd.org</a>;
>         <a class=3D"moz-txt-link-abbreviated" =
> href=3D"mailto:cem@freebsd.org">cem@freebsd.org</a>; Eitan Adler; =
> src-committers;
>         <a class=3D"moz-txt-link-abbreviated" =
> href=3D"mailto:svn-src-all@freebsd.org">svn-src-all@freebsd.org</a>; <a =
> class=3D"moz-txt-link-abbreviated" =
> href=3D"mailto:svn-src-head@freebsd.org">svn-src-head@freebsd.org</a></spa=
> n><br class=3D"">
>       <span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
> font-weight: bold;" class=3D"">Subject: </span><span style=3D"font-family:=
>  Tahoma,sans-serif; font-size: 10pt;" class=3D"">Re: svn commit: r326554 =
> -
>         in head: . usr.bin/sponge usr.bin/sponge/tests =
> usr.bin/tee</span><br class=3D"">
>       <br class=3D"">
>       <br class=3D"">
>       &gt; On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky
>       <a class=3D"moz-txt-link-rfc2396E" =
> href=3D"mailto:hps@selasky.org">&lt;hps@selasky.org&gt;</a> wrote:<br =
> class=3D"">
>       &gt; <br class=3D"">
>       &gt;&gt; On 12/05/17 13:58, Rodney W. Grimes wrote:<br class=3D"">
>       &gt;&gt; Further more, why does freebsd need this in base?<br =
> class=3D"">
>       &gt; <br class=3D"">
>       &gt; Hi,<br class=3D"">
>       &gt; <br class=3D"">
>       &gt; 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?<br class=3D"">
>       &gt; <br class=3D"">
>       &gt; --HPS<br class=3D"">
>       &gt; <br class=3D"">
>       <br class=3D"">
>       Wth is wrong with:<br class=3D"">
>       <br class=3D"">
>       data=3D$( sed -e '...' somefile ) &amp;&amp;<br class=3D"">
>       =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=
> =BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD echo "$data" =
> &gt; somefile<br class=3D"">
>       <br class=3D"">
>       or<br class=3D"">
>       <br class=3D"">
>       set -e<br class=3D"">
>       data=3D...<br class=3D"">
>       echo "$data" &gt; ...<br class=3D"">
>       <br class=3D"">
>       or<br class=3D"">
>       <br class=3D"">
>       exec 3&lt;&lt;EOF<br class=3D"">
>       $( ... )<br class=3D"">
>       EOF<br class=3D"">
>       cat &gt; ... &lt;&amp;3<br class=3D"">
>       <br class=3D"">
>       or<br class=3D"">
>       <br class=3D"">
>       (I digress)<br class=3D"">
>       <br class=3D"">
>       Infinite variations, but the gist is that sponge looks to be
>       trying to help sh(1)/similar when help is unneeded.<br class=3D"">
>       <br class=3D"">
>       Why buffer data into memory via fork-exec-pipe to sponge when you
>       can buffer to native namespace without pipe to sponge?<br =
> class=3D"">
>       <br class=3D"">
>       Am I missing something? Why do we need sponge(1)?<br class=3D"">
>       -- <br class=3D"">
>       Devin<br class=3D"">
>       <br class=3D"">
>     </blockquote>
>     <br class=3D"">
>  =20
>
> </div></div></blockquote></div><br class=3D""></body></html>=
>
> --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C--





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712060419.vB64JldG068350>