GNU logs - #36201, boring messages


Message sent to bug-sed@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#36201: Inserting files with r *before* the address
Resent-From: Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-sed@HIDDEN
Resent-Date: Thu, 13 Jun 2019 23:54:02 +0000
Resent-Message-ID: <handler.36201.B.156046999122428 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 36201
X-GNU-PR-Package: sed
X-GNU-PR-Keywords: 
To: 36201 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-sed@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.156046999122428
          (code B ref -1); Thu, 13 Jun 2019 23:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 13 Jun 2019 23:53:11 +0000
Received: from localhost ([127.0.0.1]:36311 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hbZWo-0005pg-TV
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2019 19:53:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:51256)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1hbZWm-0005pY-Qe
 for submit <at> debbugs.gnu.org; Thu, 13 Jun 2019 19:53:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35157)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <jidanni@HIDDEN>) id 1hbZWl-0003OW-Qf
 for bug-sed@HIDDEN; Thu, 13 Jun 2019 19:53:08 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_50,DATE_IN_PAST_12_24,
 RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1hbZWk-0004co-TJ
 for bug-sed@HIDDEN; Thu, 13 Jun 2019 19:53:07 -0400
Received: from aye.elm.relay.mailchannels.net ([23.83.212.6]:37940)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1hbZWk-0004aO-BB
 for bug-sed@HIDDEN; Thu, 13 Jun 2019 19:53:06 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 9313A216AE
 for <bug-sed@HIDDEN>; Thu, 13 Jun 2019 23:53:03 +0000 (UTC)
Received: from pdx1-sub0-mail-a88.g.dreamhost.com
 (100-96-14-97.trex.outbound.svc.cluster.local [100.96.14.97])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 4878A22167
 for <bug-sed@HIDDEN>; Thu, 13 Jun 2019 23:53:03 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a88.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.17.2); Thu, 13 Jun 2019 23:53:03 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Shrill-Obese: 0b5a488265ba2365_1560469983397_2217414993
X-MC-Loop-Signature: 1560469983396:3829319788
X-MC-Ingress-Time: 1560469983396
Received: from pdx1-sub0-mail-a88.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a88.g.dreamhost.com (Postfix) with ESMTP id 00F618044E
 for <bug-sed@HIDDEN>; Thu, 13 Jun 2019 16:52:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 jidanni.org; bh=UNwFdNq9FtIFDQtWZfUuZzCni10=; b=KswCMWrJ4Omgzg0c
 v93UTVJPy+x0jiqnSuD846/5u78mCOjxo4fJhGia5b7JVOFOmyQm7ju5cBbTwPiP
 PwGhZbfvMR6xGZZYP46JDEXB3iXwfezBVfbpcgpJ9jcb0YfJ2U2gDZCjYdycnzfc
 SqFS/MmegqnHKfIBgvKZl73NbfY=
Received: from jidanni.org (1-170-85-47.dynamic-ip.hinet.net [1.170.85.47])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a88.g.dreamhost.com (Postfix) with ESMTPSA id 5A0C58044D
 for <bug-sed@HIDDEN>; Thu, 13 Jun 2019 16:52:55 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a88
From: Dan Jacobson <jidanni@HIDDEN>
Date: Thu, 13 Jun 2019 19:36:37 +0800
Message-ID: <87y325emyi.8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeitddgvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpeffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepuddrudejtddrkeehrdegjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepjhhiuggrnhhnihdrohhrghdpihhnvghtpedurddujedtrdekhedrgeejpdhrvghtuhhrnhdqphgrthhhpeffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqedpmhgrihhlfhhrohhmpehjihgurghnnhhisehjihgurghnnhhirdhorhhgpdhnrhgtphhtthhopegsuhhgqdhsvggusehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 23.83.212.6
X-Spam-Score: -0.6 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.6 (-)

/bla/r filename is great, but do document how to insert the file
*before* /bla/, not only just after it.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Dan Jacobson <jidanni@HIDDEN>
Subject: bug#36201: Acknowledgement (Inserting files with r *before* the
 address)
Message-ID: <handler.36201.B.156046999122428.ack <at> debbugs.gnu.org>
References: <87y325emyi.8.fsf@HIDDEN>
X-Gnu-PR-Message: ack 36201
X-Gnu-PR-Package: sed
Reply-To: 36201 <at> debbugs.gnu.org
Date: Thu, 13 Jun 2019 23:54:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-sed@HIDDEN

If you wish to submit further information on this problem, please
send it to 36201 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
36201: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36201
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-sed@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#36201: Inserting files with r *before* the address
Resent-From: Assaf Gordon <assafgordon@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-sed@HIDDEN
Resent-Date: Sat, 29 Jun 2019 08:28:02 +0000
Resent-Message-ID: <handler.36201.B36201.15617968411199 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 36201
X-GNU-PR-Package: sed
X-GNU-PR-Keywords: 
To: Dan Jacobson <jidanni@HIDDEN>
Cc: 36201 <at> debbugs.gnu.org
Received: via spool by 36201-submit <at> debbugs.gnu.org id=B36201.15617968411199
          (code B ref 36201); Sat, 29 Jun 2019 08:28:02 +0000
Received: (at 36201) by debbugs.gnu.org; 29 Jun 2019 08:27:21 +0000
Received: from localhost ([127.0.0.1]:43387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hh8hd-0000JE-54
	for submit <at> debbugs.gnu.org; Sat, 29 Jun 2019 04:27:21 -0400
Received: from mail-pf1-f170.google.com ([209.85.210.170]:32859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1hh8hb-0000Iz-Gj; Sat, 29 Jun 2019 04:27:19 -0400
Received: by mail-pf1-f170.google.com with SMTP id x15so4139966pfq.0;
 Sat, 29 Jun 2019 01:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=bTYpd5wL9F+As3lMq7DSgCKNkpAOZfYkcKmUGPozfyg=;
 b=KNHf6EfEIA665dVaKGwI8URomgAnx7R1DkInixniTsWqejcmtxegLanRn4kGDbKqw0
 Ma4cTLz0SFCeOsiH2A4oE89oG5cSdGO7RVZhvrhEIrkpyGWhwRkpa1ZPA1/B4zjFKMqQ
 AEvE03/3zxAIstxY3ndgut/Cwke3qpSLl0lkXhZoE1zLcrcfodZgyOxSlygrqkV1oP/y
 yEE45LtMfg+RRGCDCy2eDcMslR8HZP4qhWnXkZcRN/bzV9yoVFtCjcfqhpAQQYdBFlID
 VhGKfb/eIFsBTqOwhAAAG3cXnlUxwc7HghJhlcxBLinDQbTv8/EcK0udYYpNgctqo/MQ
 43Dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to:user-agent;
 bh=bTYpd5wL9F+As3lMq7DSgCKNkpAOZfYkcKmUGPozfyg=;
 b=rWbc/njvW8FrhluiRz84ISc5OyjAdqXIYr6PqIZ6teImlNh8sx2sCKd39dEJz+7k8I
 r6tPlV1D7Hq5gBeogu2p/QGxd0xAcWkdoIeDiOldjCMxYEyazlzPKh9OAzz32d8jzXKz
 xRkh8vB85THQ/yWSbe7lA1m90pL2YacBwBzjo4iqyrfUL4TLmd0CDIDC6rZHX1Yr2qm6
 +zPzb1DAzI9Z19RWIUREYwScHkjlIcla3P5hH2x9pPjA4KblYJ9bwm5bwwKZoryerI4X
 G+nOC9q7q3iA2QetZFOvpVKQUpoFuObltIEAogtD/1gzJlwHqG3/XICmynjt+3uTkZYG
 ilkQ==
X-Gm-Message-State: APjAAAXXgA0gGYJkJrUkxKYEBlHyr1sTzW3Q5igNjo4YWh23Msn0VNCV
 YpJq7vZKlLNrDOfBHTeDV59uXf+4
X-Google-Smtp-Source: APXvYqxQUqgPvgkhqLDWU1/ARD345OvP19E0vSFzCl2RxJCbmOW31wTZ25ZlTsNHN2Zcyi4MHOjqyA==
X-Received: by 2002:a17:90a:258b:: with SMTP id
 k11mr17429740pje.110.1561796833009; 
 Sat, 29 Jun 2019 01:27:13 -0700 (PDT)
Received: from tomato (moose.housegordon.com. [184.68.105.38])
 by smtp.gmail.com with ESMTPSA id r88sm4490622pjb.8.2019.06.29.01.27.11
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 29 Jun 2019 01:27:11 -0700 (PDT)
Received: by tomato (Postfix, from userid 1000)
 id 7D57A68099C; Sat, 29 Jun 2019 02:27:10 -0600 (MDT)
Date: Sat, 29 Jun 2019 02:27:10 -0600
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <20190629082710.GD29034@HIDDEN>
References: <87y325emyi.8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87y325emyi.8.fsf@HIDDEN>
User-Agent: Mutt/1.11.4 (2019-03-13)
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tag 36201 moreinfo
stop

Hello,

On Thu, Jun 13, 2019 at 07:36:37PM +0800, Dan Jacobson wrote:
> /bla/r filename is great, but do document how to insert the file
> *before* /bla/, not only just after it.

Off the top of my head, I can't think of a built-in way to insert a file
before an address (am I missing something?).

One could probably come up with some incantation using multiline
commands (D/G/H/N/P):
https://www.gnu.org/software/sed/manual/sed.html#Multiline-techniques

But I think this one is easier using gawk:

    $ echo FOO > bar
    $ seq 5 \
         | gawk '/5/ { while ((getline tmp < "bar")>0) { print tmp } } ; 1'
    1
    2
    3
    4
    FOO
    5

Or are you asking for a new feature of inserting a file before an
address?

regards,
 - assaf





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 29 Jun 2019 08:27:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 29 04:27:21 2019
Received: from localhost ([127.0.0.1]:43389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hh8hd-0000JI-DF
	for submit <at> debbugs.gnu.org; Sat, 29 Jun 2019 04:27:21 -0400
Received: from mail-pf1-f170.google.com ([209.85.210.170]:32859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1hh8hb-0000Iz-Gj; Sat, 29 Jun 2019 04:27:19 -0400
Received: by mail-pf1-f170.google.com with SMTP id x15so4139966pfq.0;
 Sat, 29 Jun 2019 01:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=bTYpd5wL9F+As3lMq7DSgCKNkpAOZfYkcKmUGPozfyg=;
 b=KNHf6EfEIA665dVaKGwI8URomgAnx7R1DkInixniTsWqejcmtxegLanRn4kGDbKqw0
 Ma4cTLz0SFCeOsiH2A4oE89oG5cSdGO7RVZhvrhEIrkpyGWhwRkpa1ZPA1/B4zjFKMqQ
 AEvE03/3zxAIstxY3ndgut/Cwke3qpSLl0lkXhZoE1zLcrcfodZgyOxSlygrqkV1oP/y
 yEE45LtMfg+RRGCDCy2eDcMslR8HZP4qhWnXkZcRN/bzV9yoVFtCjcfqhpAQQYdBFlID
 VhGKfb/eIFsBTqOwhAAAG3cXnlUxwc7HghJhlcxBLinDQbTv8/EcK0udYYpNgctqo/MQ
 43Dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to:user-agent;
 bh=bTYpd5wL9F+As3lMq7DSgCKNkpAOZfYkcKmUGPozfyg=;
 b=rWbc/njvW8FrhluiRz84ISc5OyjAdqXIYr6PqIZ6teImlNh8sx2sCKd39dEJz+7k8I
 r6tPlV1D7Hq5gBeogu2p/QGxd0xAcWkdoIeDiOldjCMxYEyazlzPKh9OAzz32d8jzXKz
 xRkh8vB85THQ/yWSbe7lA1m90pL2YacBwBzjo4iqyrfUL4TLmd0CDIDC6rZHX1Yr2qm6
 +zPzb1DAzI9Z19RWIUREYwScHkjlIcla3P5hH2x9pPjA4KblYJ9bwm5bwwKZoryerI4X
 G+nOC9q7q3iA2QetZFOvpVKQUpoFuObltIEAogtD/1gzJlwHqG3/XICmynjt+3uTkZYG
 ilkQ==
X-Gm-Message-State: APjAAAXXgA0gGYJkJrUkxKYEBlHyr1sTzW3Q5igNjo4YWh23Msn0VNCV
 YpJq7vZKlLNrDOfBHTeDV59uXf+4
X-Google-Smtp-Source: APXvYqxQUqgPvgkhqLDWU1/ARD345OvP19E0vSFzCl2RxJCbmOW31wTZ25ZlTsNHN2Zcyi4MHOjqyA==
X-Received: by 2002:a17:90a:258b:: with SMTP id
 k11mr17429740pje.110.1561796833009; 
 Sat, 29 Jun 2019 01:27:13 -0700 (PDT)
Received: from tomato (moose.housegordon.com. [184.68.105.38])
 by smtp.gmail.com with ESMTPSA id r88sm4490622pjb.8.2019.06.29.01.27.11
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 29 Jun 2019 01:27:11 -0700 (PDT)
Received: by tomato (Postfix, from userid 1000)
 id 7D57A68099C; Sat, 29 Jun 2019 02:27:10 -0600 (MDT)
Date: Sat, 29 Jun 2019 02:27:10 -0600
From: Assaf Gordon <assafgordon@HIDDEN>
To: Dan Jacobson <jidanni@HIDDEN>
Subject: Re: bug#36201: Inserting files with r *before* the address
Message-ID: <20190629082710.GD29034@HIDDEN>
References: <87y325emyi.8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87y325emyi.8.fsf@HIDDEN>
User-Agent: Mutt/1.11.4 (2019-03-13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
Cc: 36201 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tag 36201 moreinfo
stop

Hello,

On Thu, Jun 13, 2019 at 07:36:37PM +0800, Dan Jacobson wrote:
> /bla/r filename is great, but do document how to insert the file
> *before* /bla/, not only just after it.

Off the top of my head, I can't think of a built-in way to insert a file
before an address (am I missing something?).

One could probably come up with some incantation using multiline
commands (D/G/H/N/P):
https://www.gnu.org/software/sed/manual/sed.html#Multiline-techniques

But I think this one is easier using gawk:

    $ echo FOO > bar
    $ seq 5 \
         | gawk '/5/ { while ((getline tmp < "bar")>0) { print tmp } } ; 1'
    1
    2
    3
    4
    FOO
    5

Or are you asking for a new feature of inserting a file before an
address?

regards,
 - assaf





Message sent to bug-sed@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#36201: Inserting files with r *before* the address
In-Reply-To: <87y325emyi.8.fsf@HIDDEN>
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-sed@HIDDEN
Resent-Date: Sat, 29 Jun 2019 14:36:02 +0000
Resent-Message-ID: <handler.36201.B36201.15618189413901 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 36201
X-GNU-PR-Package: sed
X-GNU-PR-Keywords: moreinfo
To: Assaf Gordon <assafgordon@HIDDEN>
Cc: 36201 <at> debbugs.gnu.org
Received: via spool by 36201-submit <at> debbugs.gnu.org id=B36201.15618189413901
          (code B ref 36201); Sat, 29 Jun 2019 14:36:02 +0000
Received: (at 36201) by debbugs.gnu.org; 29 Jun 2019 14:35:41 +0000
Received: from localhost ([127.0.0.1]:44790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hhES5-00010q-8V
	for submit <at> debbugs.gnu.org; Sat, 29 Jun 2019 10:35:41 -0400
Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]:26897)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1hhERz-00010f-W0
 for 36201 <at> debbugs.gnu.org; Sat, 29 Jun 2019 10:35:39 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id CB19B140298;
 Sat, 29 Jun 2019 14:35:34 +0000 (UTC)
Received: from pdx1-sub0-mail-a70.g.dreamhost.com
 (100-96-91-148.trex.outbound.svc.cluster.local [100.96.91.148])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 2B0D31401A3;
 Sat, 29 Jun 2019 14:35:34 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a70.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.17.2); Sat, 29 Jun 2019 14:35:34 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Left-Stop: 123751711eb07d06_1561818934643_796885312
X-MC-Loop-Signature: 1561818934643:3549009227
X-MC-Ingress-Time: 1561818934643
Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id D8C0280885;
 Sat, 29 Jun 2019 07:35:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc
 :subject:references:date:message-id:mime-version:content-type;
 s=jidanni.org; bh=j0Gdjn9p95ULWWD8PXv4qX8troM=; b=noxmaSufgNCl1
 duYuDhIbYER8ylGW5+bi4aelG7/vv4TwDW40PcIjTQMeGEn9HZHPkLRD/ZhnK61D
 1JE7UgW5sotttAgr38O8zduoCaJWkOvZP/QHqF0Yo/1NxnSeGIup0ddEgI8M3BKJ
 Vrfs+OBX2hFOzdhct3Gt+u8RWXOrNk=
Received: from jidanni.org (114-41-19-5.dynamic-ip.hinet.net [114.41.19.5])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTPSA id 8E3D980887;
 Sat, 29 Jun 2019 07:35:27 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a70
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
References: <87y325emyi.8.fsf@HIDDEN>
 <20190629082710.GD29034@HIDDEN>
Date: Sat, 29 Jun 2019 22:35:23 +0800
Message-ID: <874l48zcgk.2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> "AG" == Assaf Gordon <assafgordon@HIDDEN> writes:
AG> Off the top of my head, I can't think of a built-in way to insert a file
AG> before an address (am I missing something?).

AG> One could probably come up with some incantation using multiline
AG> commands (D/G/H/N/P):
AG> https://www.gnu.org/software/sed/manual/sed.html#Multiline-techniques

OK maybe at the r documentation say "The reader is welcome to add a recipe for adding
a file before the line (like i vs. a)." Else folks will wonder that
nobody thought of it.

AG> But I think this one is easier using gawk:
No fair using gawk. We're talking about sed.

AG> Or are you asking for a new feature of inserting a file before an
AG> address?

I think no more features should be added to sed as there is perl...





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.