GNU bug report logs - #36201
Inserting files with r *before* the address

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: sed; Reported by: Dan Jacobson <jidanni@HIDDEN>; Keywords: moreinfo; dated Thu, 13 Jun 2019 23:54:02 UTC; Maintainer for sed is bug-sed@HIDDEN.
Added tag(s) moreinfo. Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 36201) 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]: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>
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: 36201
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





Information forwarded to bug-sed@HIDDEN:
bug#36201; Package sed. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 13 Jun 2019 23:53:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 19:53:11 2019
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>
To: bug-sed@HIDDEN
Subject: Inserting files with r *before* the address
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-Debbugs-Envelope-To: submit
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.




Acknowledgement sent to Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-sed@HIDDEN. Full text available.
Report forwarded to bug-sed@HIDDEN:
bug#36201; Package sed. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 29 Jun 2019 08:30:02 UTC

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