From MAILER-DAEMON Wed May 27 01:08:36 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jdoIt-00079j-Tx for mharc-bug-sed@gnu.org; Wed, 27 May 2020 01:08:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdnU2-0003cE-OA for bug-sed@gnu.org; Wed, 27 May 2020 00:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdnU2-0005v5-FL for bug-sed@gnu.org; Wed, 27 May 2020 00:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdnU2-0007QC-Bx for bug-sed@gnu.org; Wed, 27 May 2020 00:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41558: Regexp Bug Resent-From: "anton.paras" Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Wed, 27 May 2020 04:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41558 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: 41558@debbugs.gnu.org X-Debbugs-Original-To: "bug-sed" Received: via spool by submit@debbugs.gnu.org id=B.159055294028495 (code B ref -1); Wed, 27 May 2020 04:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 May 2020 04:15:40 +0000 Received: from localhost ([127.0.0.1]:47933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdnTg-0007PX-75 for submit@debbugs.gnu.org; Wed, 27 May 2020 00:15:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:40908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdnSO-0007ND-SR for submit@debbugs.gnu.org; Wed, 27 May 2020 00:14:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdnSO-0000UZ-HN for bug-sed@gnu.org; Wed, 27 May 2020 00:14:20 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdnSM-0005E2-Uk for bug-sed@gnu.org; Wed, 27 May 2020 00:14:20 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590552854; cv=none; d=zohomail.com; s=zohoarc; b=gyV9OqJPWue/YVWc8rOQWlDYNLgKSWrK+Vb8hDMNGmzFLpoBVzRf6jPCi3IH3scw0uF/SGoYIZCVjptMBk6N3hN00h5B7QYKLt1B14PjUcYzuE1uXAGPCWCE+jch+WQ9xvwGEDWJ2tZEsZFNmB1MC7vLmopsxbZ/RvZpj3vb1Yw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590552854; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=PZNLqOEcM8UOjjpvEVT3pSxEy3uKb0lRrX8WbZiq8tY=; b=QlaXBEdb1xljlk1VOzTYNxdk/iK23CYvwGohh2Oxfy+vjk0jjuPCz+gZCjzvsrxjM1qI7tIuuL9ddA2De4Dh+4N5/CAqTdARqFwZh1NheG5rdxIjpi0T0uFCQB2J7CuYN/YXrD4qqzVNy+YfL59ZVFDfjAOUvC2/WzcxWwsttcs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass smtp.mailfrom=anton@paras.nu; dmarc=pass header.from= header.from= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1590552852258488.11498111205174; Tue, 26 May 2020 21:14:12 -0700 (PDT) Date: Tue, 26 May 2020 21:14:12 -0700 From: "anton.paras" Message-Id: <1725456771f.faa89eb1779723.3781870193454561653@paras.nu> In-Reply-To: MIME-Version: 1.0 Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.51; envelope-from=anton@paras.nu; helo=sender4-of-o51.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:14:15 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Wed, 27 May 2020 00:15:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Wed, 27 May 2020 01:08:35 -0400 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 04:16:02 -0000 I posted to Stack Exchange, and they recommended that I file a bug. I'd rat= her not copy+paste it all, so here's the link: https://unix.stackexchange.com/questions/579889/why-doesnt-this-sed-command= -replace-the-3rd-to-last-and here's an example > echo 'dog and foo and bar and baz land good' |=C2=A0=C2=A0=C2=A0 sed -E '= s/(.*)\band\b((.*\band\b){2})/\1XYZ\2/' expected output:=C2=A0dog XYZ foo and bar and baz land good actual output:=C2=A0dog and foo XYZ bar and baz land good here's my sed --version output:=C2=A0sed (GNU sed) 4.2.2 I hope this is helpful, cheers! From MAILER-DAEMON Thu May 28 02:30:08 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jeC3K-0002K1-Qo for mharc-bug-sed@gnu.org; Thu, 28 May 2020 02:30:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeC3H-0002Jn-4T for bug-sed@gnu.org; Thu, 28 May 2020 02:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeC3G-0003eE-R1 for bug-sed@gnu.org; Thu, 28 May 2020 02:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeC3G-0002Y8-MQ for bug-sed@gnu.org; Thu, 28 May 2020 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41558: Regexp Bug Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Thu, 28 May 2020 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41558 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: <41558@debbugs.gnu.org> Cc: "anton.paras" , bug-gnulib@gnu.org Received: via spool by 41558-submit@debbugs.gnu.org id=B41558.15906473919761 (code B ref 41558); Thu, 28 May 2020 06:30:02 +0000 Received: (at 41558) by debbugs.gnu.org; 28 May 2020 06:29:51 +0000 Received: from localhost ([127.0.0.1]:50765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeC35-0002XN-1G for submit@debbugs.gnu.org; Thu, 28 May 2020 02:29:51 -0400 Received: from mailgw07.kcn.ne.jp ([61.86.7.214]:60030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeC33-0002X9-MU for 41558@debbugs.gnu.org; Thu, 28 May 2020 02:29:50 -0400 Received: from mxs02-s (mailgw2.kcn.ne.jp [61.86.15.234]) by mailgw07.kcn.ne.jp (Postfix) with ESMTP id 87A0F4104C for <41558@debbugs.gnu.org>; Thu, 28 May 2020 15:29:42 +0900 (JST) X-matriXscan-loop-detect: a40e939f492f056bb110ae47e414306f2758204b Received: from mail11.kcn.ne.jp ([61.86.6.129]) by mxs02-s with ESMTP; Thu, 28 May 2020 15:29:41 +0900 (JST) Received: from [10.120.1.110] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail11.kcn.ne.jp (Postfix) with ESMTPA id 159D940A8780; Thu, 28 May 2020 15:29:41 +0900 (JST) Date: Thu, 28 May 2020 15:29:39 +0900 From: Norihiro Tanaka In-Reply-To: <1725456771f.faa89eb1779723.3781870193454561653@paras.nu> References: <1725456771f.faa89eb1779723.3781870193454561653@paras.nu> Message-Id: <20200528152938.89DF.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.74.02 [ja] X-matriXscan-msec-AV: Clean X-matriXscan-Action: Approve X-matriXscan: Uncategorized X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 06:30:04 -0000 On Tue, 26 May 2020 21:14:12 -0700 "anton.paras" wrote: > I posted to Stack Exchange, and they recommended that I file a bug. I'd rather not copy+paste it all, so here's the link: > > > > https://unix.stackexchange.com/questions/579889/why-doesnt-this-sed-command-replace-the-3rd-to-last-and > > > > here's an example > > > > > echo 'dog and foo and bar and baz land good' |??? sed -E 's/(.*)\band\b((.*\band\b){2})/\1XYZ\2/' > > > > expected output:?dog XYZ foo and bar and baz land good > > actual output:?dog and foo XYZ bar and baz land good > > > here's my sed --version output:?sed (GNU sed) 4.2.2 > > > > I hope this is helpful, cheers! $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 sed -nE '/(.*\band){2}/p' foo and bar land $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 sed -nE '/.*\band.*\band/p' $ It seems that there is the bug in regex. expected: $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 sed -nE '/(.*\band){2}/p' $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 sed -nE '/.*\band.*\band/p' $ It also reproduces in grep. $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 grep -E '(.*\band){2}' foo and bar land $ echo 'foo and bar land' | env LC_ALL=en_US.utf8 grep -E '.*\band.*\band' $ From MAILER-DAEMON Sat May 30 09:11:00 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jf1GO-0005db-Mh for mharc-bug-sed@gnu.org; Sat, 30 May 2020 09:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jewUI-0006br-Sb for bug-sed@gnu.org; Sat, 30 May 2020 04:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jewUI-0001ro-Jq for bug-sed@gnu.org; Sat, 30 May 2020 04:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jewUI-0008Jb-EX for bug-sed@gnu.org; Sat, 30 May 2020 04:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#36150: ERROR: testsuite/inplace-selinux.sh Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Sat, 30 May 2020 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36150 X-GNU-PR-Package: sed X-GNU-PR-Keywords: moreinfo To: Assaf Gordon , Timothy Sample Cc: Vineet Jain , 36150@debbugs.gnu.org Received: via spool by 36150-submit@debbugs.gnu.org id=B36150.159082588031925 (code B ref 36150); Sat, 30 May 2020 08:05:02 +0000 Received: (at 36150) by debbugs.gnu.org; 30 May 2020 08:04:40 +0000 Received: from localhost ([127.0.0.1]:56900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jewTs-0008In-PN for submit@debbugs.gnu.org; Sat, 30 May 2020 04:04:40 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:56194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jewTn-0008IV-JE for 36150@debbugs.gnu.org; Sat, 30 May 2020 04:04:35 -0400 Received: by mail-pj1-f68.google.com with SMTP id fs4so2613854pjb.5 for <36150@debbugs.gnu.org>; Sat, 30 May 2020 01:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6bHWh4/VykurZ1H0rjqLGwvg9SereSnJ4KQvpb81vIw=; b=lGGObr3WOnXNIEY3M3GUlDYoX3pLI29vid2VEa7YVIAHzwcTHK/B55Mv80Lcypwn95 PG2zdYlEnrqKzkZyUUu7oocTdQYX9uboc9xmJA7ojTKRffICbPsh5Fha4Gs6XfwMeAVK GQxftV7ETDjuqSplr3qnbgCRfsYVWXtjjC1L6QWf0US+K5WMxWGriKOs7E0FW0VSFZN1 O8jwS+3DghaCLMY/AVTD0Kq0t0bvtHJlACyeeOJgc8/NZZCAYK41BCANUt2OlidzzDCq F2brFw43kTkmKnwnoCjkxmnL4XZYY7H7Uk6HlgQ8tXlJgt/cWFh92uwVgVpVIJPHqMPn Lv/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6bHWh4/VykurZ1H0rjqLGwvg9SereSnJ4KQvpb81vIw=; b=j2rMjh1A3b6LjdqJc5+J/XP5QRo0BrqrYTs3XeDRNbYVQzluehbjAbxBpn8UZYj6IC pLljVSy51Rnw7atV3V2LctbMAC1IxVHvEERRBZz6CfOlYMYwRohFGkQoIHFzZzBRiEqs j7kwTPxeX9U/+Ox5gLVfM2S7AvEaHAL/sN7dtVYNdOtgFZFK4FoydYb8R6yf5iEX/kAV 2ZOzwtF+7ZZSdcGoSOr2iXoJMrh3BPjIDEGa0V173lFUoaBhpPvc0NIEZMNOWTP1UtzT Ho0NDjYFDPVwYgZ7YwHJ1ojv8y84m/pAaFcnsb55XCrztQ1eT6H5nh1PSHZrFyYmUoxJ oUFg== X-Gm-Message-State: AOAM530uxLp/AklHSUe26r1me74Ccq74jVis57cWgc0Qof7dvpYozyLr wHQvLuIEnen2RAhRLRL0VIk= X-Google-Smtp-Source: ABdhPJwPUVOiXsloDQZRbjDP+DJ2p8bK1w80y10AOI5lqaRWpdEsePJa3WMkeapwRPf+I2jcHjvigg== X-Received: by 2002:a17:902:ba8e:: with SMTP id k14mr11963288pls.85.1590825865620; Sat, 30 May 2020 01:04:25 -0700 (PDT) Received: from garuda-lan (c-73-97-103-127.hsd1.wa.comcast.net. [73.97.103.127]) by smtp.gmail.com with ESMTPSA id z29sm9379024pff.120.2020.05.30.01.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 May 2020 01:04:24 -0700 (PDT) From: Chris Marusich References: <20190629083718.GE29034@tomato.moose.housegordon.com> <87pngzv8rg.fsf@ngyro.com> Date: Sat, 30 May 2020 01:04:19 -0700 In-Reply-To: <87pngzv8rg.fsf@ngyro.com> (Timothy Sample's message of "Sat, 07 Dec 2019 21:41:39 -0500") Message-ID: <87eer1yhks.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) X-Mailman-Approved-At: Sat, 30 May 2020 09:10:59 -0400 X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 08:05:03 -0000 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Timothy Sample writes: > I ran into this bug when building Sed via GNU Guix running on top of > Fedora 31. This means I was building Sed version 4.7 from the release > tarball. Me, too! I reported it here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41498 > The generated Makefile did set =E2=80=9CCONFIG_HEADER=E2=80=9D. However,= I noticed that > =E2=80=9CCONFIG_HEADER=E2=80=9D was absent from the list of variables pro= pagated into > the test environment (see the =E2=80=9CTEST_ENVIRONMENT=E2=80=9D variable= in > =E2=80=9Ctestsuite/local.mk=E2=80=9D). Adding it there allowed the test = to be skipped > rather than causing a hard error. Yes, this fixes the issue for me, too. I have attached a patch. Assaf, how does this look? =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tests-Export-CONFIG_HEADER-to-test-scripts.patch Content-Transfer-Encoding: quoted-printable From=20ff001cbe5c7253a8825e5ad553f84b8d763013ac Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 30 May 2020 00:20:48 -0700 Subject: [PATCH] tests: Export CONFIG_HEADER to test scripts. Before this change, the testsuite/inplace-selinux test fails in some cases when SELinux is available. The reason it fails is because the require_selinux_ function in init.cfg expects the CONFIG_HEADER environment variable to be defined, but in fact it is not defined. Even though we do invoke AM_CONFIG_HEADER in configure.ac, and even though the CONFIG_HEADER variable does get set in the resulting Makefile, nothing actually exports the CONFIG_HEADER variable, so the test is doomed to fail whenever it is not skipped. Fix this by exporting the variable. * testsuite/local.mk (TESTS_ENVIRONMENT): Add CONFIG_HEADER to the list of variables to export to the environment of the test scripts. Reported by Vineet Jain in https://bugs.gnu.org/36150 . The fix was suggested by Timothy Sample in the same bug report. =2D-- testsuite/local.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/local.mk b/testsuite/local.mk index 2b3bf86..9dac4f3 100644 =2D-- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -161,6 +161,7 @@ TESTS_ENVIRONMENT =3D \ abs_top_builddir=3D'$(abs_top_builddir)' \ abs_top_srcdir=3D'$(abs_top_srcdir)' \ abs_srcdir=3D'$(abs_srcdir)' \ + CONFIG_HEADER=3D'$(CONFIG_HEADER)' \ built_programs=3Dsed; \ srcdir=3D'$(srcdir)' \ top_srcdir=3D'$(top_srcdir)' \ =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl7SE4MACgkQ3UCaFdgi Rp0GAhAAn6UH141aA3dvNwUlIuBld1kbykXD9EGlhAUjhJ1ASRN7JOx+v+LPaFey egN6Rv9hLdzX5/AJ6fIOt10NJGR9PadhOxc5TRxp7lUjvNOohB+YPTNiCdZhOINW oFPynnoUGPniX1OZti2Hvoqm939Q4kNzE1Xe0A8AzUu/3RgQ4xrMA/nZO3JDYMKn HUI0baoun4qR0vyVRw1AIKfi4mpsVpulv/JXERDtJyjJ3gQfhSMpMW23Mi7nMsYW CxNrFNxwOEVKLAy5QDn5yM9gpZqPoYPI6dvl2i/lhq3wKKq55rPan/lhZLZEXp8e U1SBW0TieFX5UViAVW8ivtEAO05VNCsfOXlMUcmVg9Pq8JIfdSieyodZG3YCGrJl grECAlqKimQtWKVU9FpE1EhTq64li9J5n0oSxS4br5KhMSxUY924YQ8+Ki9BQ8bu /Z08tU/PMBdNw7FMKe0FSpWHQDXSLovZTxoxrguFwdro0QeuwwZkkJdKvwUVwaXP EbWfNvd2T1LbLFYbMAJoOiCcQoDz4OtDcjv/TjQOD0YqKrlBmMsxVrkF0f3H4ImP 8X0krFUhbzp/VxMcpeno+BTZ+fEjimqTYCZy4w8MoHTSX5u7REAWo3PG8D6WI/P/ dLhGkXrKJ3qzFyjwz1yGl3OnJH9sOT6TeYn6yqbF1QmCzG5EqI0= =XHYv -----END PGP SIGNATURE----- --==-=-=-- From MAILER-DAEMON Sat May 30 13:01:06 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jf4r4-0000Li-HE for mharc-bug-sed@gnu.org; Sat, 30 May 2020 13:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4IA-0005S6-JH for bug-sed@gnu.org; Sat, 30 May 2020 12:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4IA-00067W-8i for bug-sed@gnu.org; Sat, 30 May 2020 12:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4IA-00064u-3j for bug-sed@gnu.org; Sat, 30 May 2020 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41617: Bug. Resent-From: Anurag Kumar Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Sat, 30 May 2020 16:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41617 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: 41617@debbugs.gnu.org X-Debbugs-Original-To: bug-sed@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159085585423302 (code B ref -1); Sat, 30 May 2020 16:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 May 2020 16:24:14 +0000 Received: from localhost ([127.0.0.1]:58951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4HN-00063k-Dm for submit@debbugs.gnu.org; Sat, 30 May 2020 12:24:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:39080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf3Yk-0004wC-1z for submit@debbugs.gnu.org; Sat, 30 May 2020 11:38:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf3Yj-0004rH-Qt for bug-sed@gnu.org; Sat, 30 May 2020 11:38:05 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:43861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf3Yi-00021M-WF for bug-sed@gnu.org; Sat, 30 May 2020 11:38:05 -0400 Received: by mail-ed1-x530.google.com with SMTP id g9so3999211edw.10 for ; Sat, 30 May 2020 08:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=a1Pp4pLPzRoOcA+Sg0dwBQaKI31Vj2iHr+Ko+0Z7FJc=; b=ucYJW6RO4Hb+HrAkKWYfUa3Wti2tuxgekKhYy9a2hACgCjhZuFUuZjVixndOkKhb3i L6NAtVNn9YSbuuIh2JgqV7jTMQmYQCTmnUENNdzG+d8TaKuQOnIBVxfZH9Aub15VefPT U6aOKO4BgEY9yNtuXP7TTeyV+h+WFH8Axz4zzrvipwslemvVmmSCYBLaeoULzkBJ0Qpf /6px4pLm9cuqjv7RwAVMnc3Cp8EQ2mGqU2dF2XXxvUH7yXhcIW8ScVeBHpcbTIxrgLUU 33/AQX1vyAlXxLzSHSnF1BJSfg7Q7NVpHdlh7YWcPUFI/TwsORdWImvlr9gPCwlBglhJ ZC+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=a1Pp4pLPzRoOcA+Sg0dwBQaKI31Vj2iHr+Ko+0Z7FJc=; b=qW47JzoiccOjZ5OnecGX3pahGvyw63mss+vdJKrEngStRLCxaEw1MGxhHVFdsrRtoN eesamYwIj/8NMnH3i9+CZVO4QtUlwFgZHIqgX91lptuWYKWDsxz6GiJjYhgO6qxx7z5d +saYQ/RZTHSuwmZoi9BhxBvVJ2g7mJZYmLA5/0ZhrIa0sfsOS0P5Q0SytnAYyPZ5ovJp zdNCq5oT2MLoI0ePnLJLCIpH7bJXuu9/PGnYA+eXFHBdGB0Xs77EEFxZZw1rH3BMRtwg 9J4/UtB2kWNpb1cqhf0DTddEr3/mAO7KNbQ80XNubw4Y3/+OfB+Wbm4cjRDL7UdYOqwr Wp6g== X-Gm-Message-State: AOAM530iLGpI3TjkktIjMG6q7ZZ7m9lYstAISgXxdoIExzl8Y1Kg1Vjm /yO5vQQy5KNmMvClyw9C8TTSrtM/bgVlKqhLHqf5COk= X-Google-Smtp-Source: ABdhPJwvA6ktmnZ/ZB8a7YGXcqW/vdQ9JzE7vaK+AdIFMz3LiSHxbu6/EWZfT+hZ0zrtesoky+8nzEV3Px4x78A5fCQ= X-Received: by 2002:a50:d7d1:: with SMTP id m17mr14081755edj.126.1590853082431; Sat, 30 May 2020 08:38:02 -0700 (PDT) MIME-Version: 1.0 From: Anurag Kumar Date: Sat, 30 May 2020 21:07:51 +0530 Message-ID: Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=anuragsinghsmth@gmail.com; helo=mail-ed1-x530.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.4 (/) X-Mailman-Approved-At: Sat, 30 May 2020 12:24:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Sat, 30 May 2020 13:01:01 -0400 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 16:25:02 -0000 Hi, I am getting an issue when using [sed -i.bak "s/localhost/$ip/" filepath] it is not able to replace the ip value in the concerned file. Thanks Anurag kumar From MAILER-DAEMON Sat May 30 15:38:04 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jf7Iy-0006lB-D0 for mharc-bug-sed@gnu.org; Sat, 30 May 2020 15:38:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf7Iw-0006kv-UH for bug-sed@gnu.org; Sat, 30 May 2020 15:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf7Iw-0004Wd-Kg for bug-sed@gnu.org; Sat, 30 May 2020 15:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf7Iw-0004cE-G3 for bug-sed@gnu.org; Sat, 30 May 2020 15:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41617: Bug. Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Sat, 30 May 2020 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41617 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: Anurag Kumar , 41617@debbugs.gnu.org Received: via spool by 41617-submit@debbugs.gnu.org id=B41617.159086747417725 (code B ref 41617); Sat, 30 May 2020 19:38:02 +0000 Received: (at 41617) by debbugs.gnu.org; 30 May 2020 19:37:54 +0000 Received: from localhost ([127.0.0.1]:59250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf7Io-0004bj-3k for submit@debbugs.gnu.org; Sat, 30 May 2020 15:37:54 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:39598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf7Im-0004bR-2x; Sat, 30 May 2020 15:37:52 -0400 Received: by mail-pg1-f177.google.com with SMTP id w20so1634011pga.6; Sat, 30 May 2020 12:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=FOvmeUYs4KU1iKfo8y18VvlhLZcDub6+BL/K2jznl98=; b=TBsrOFqPQyQpDdb54ry4FY166XCYX/z9T7ghyLnoeqNuXZyzwDFuJ0+vPf8NGq+MuT i3y+QFG1ssv0JfADItp0R4nGW1G0zjCeMRIYo6qOH0cfG/DVpefwKvSz2LVV0quqsndm l3SwaRx/+k+V31O3wMgoat48PYpm1qT/6cNH3I6ZcW52gdPA7SZy2V/cLjAjfqkkgSwd AbtKQJo9xXY9XBYY7eQ623VD0RJVElwh3Br/qvf4v9GICn3MZ+k+UuaNw+WmIXOUPBzh BAPE7Y5dCJa4jb7VsDT09b//YuDRaYzqrn5xxlgP8ZOAAOfOQtW2Znv3MTLT247HqEeV ILTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FOvmeUYs4KU1iKfo8y18VvlhLZcDub6+BL/K2jznl98=; b=im117XiwklY0N7uB61MwMnYd0ZO3zUI0dwBnMuIlCUmtWs1SyyXZQH7JTpFEJjYTJo j6/mGL7fiQj3c69MxZKvb8s5mESH3vVxAdhbYtLy1+aJwC3Tm9/t0PkLwSZ66s3gbDhV uIMGS1vyMRpzLH5Qp0V7LZv7j5EGzoFiA/wKxGtAJ7xP6o90ClWdGjiSPckdB65df3Dw s0qtTnQBnEArABII+jNJOn9CJyw+6dZcaR/GkGZv/TA3Cgc3b6xhjUly/JQOxw6cOkRD 6geWY9EABMRyEGAqEBC8GDviDTTQZ/Z/H9B3YFPU1YHfimp1kG7MrVpxPLBPHgQJBrbZ hHkw== X-Gm-Message-State: AOAM530Jtf/kqzCEU9yyFAXCUryAm98Vka5WpxiYXNkeTzgZJvp8oAcj 8JQ+A2MdOCxT/2v8z4+bxUMnMpSW X-Google-Smtp-Source: ABdhPJzzFWYB3HSDVg/Nl9Pfho8Qos5Mij012lFz0eSn3Ou7dQS2F6msDPTcZ9HPKmVI73aVDZ4TjA== X-Received: by 2002:a63:2c93:: with SMTP id s141mr13313796pgs.326.1590867465542; Sat, 30 May 2020 12:37:45 -0700 (PDT) Received: from tomato.moose.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id d21sm10295176pfd.109.2020.05.30.12.37.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 May 2020 12:37:44 -0700 (PDT) References: From: Assaf Gordon Message-ID: Date: Sat, 30 May 2020 13:37:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 19:38:03 -0000 tag 41617 moreinfo stop Hello, On 2020-05-30 9:37 a.m., Anurag Kumar wrote: > I am getting an issue when using [sed -i.bak "s/localhost/$ip/" > filepath] it is not able to replace the ip value in the concerned file. To help diagnose this issue, we'll need a bit more information, e.g.: What is the content of the file before sed ? what is the content of the file after sed ? what is the content of the file you expected to see? are there any errors printed to the screen? what version of sed are you using? For example, the following sequence works for me: $ echo "hello localhost server" > tmp $ ip=1.2.3.4 $ sed -i.bak "s/localhost/$ip/" tmp $ head tmp tmp.bak ==> tmp <== hello 1.2.3.4 server ==> tmp.bak <== hello localhost server regards, - assaf From MAILER-DAEMON Sat May 30 21:22:04 2020 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jfCfs-0006nr-Nv for mharc-bug-sed@gnu.org; Sat, 30 May 2020 21:22:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfCfq-0006nN-NU for bug-sed@gnu.org; Sat, 30 May 2020 21:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfCfq-0004b4-D3 for bug-sed@gnu.org; Sat, 30 May 2020 21:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfCfq-00006e-8Z for bug-sed@gnu.org; Sat, 30 May 2020 21:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41617: Bug. Resent-From: Anurag Kumar Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Sun, 31 May 2020 01:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41617 X-GNU-PR-Package: sed X-GNU-PR-Keywords: moreinfo To: Assaf Gordon Cc: 41617@debbugs.gnu.org Received: via spool by 41617-submit@debbugs.gnu.org id=B41617.1590888115393 (code B ref 41617); Sun, 31 May 2020 01:22:02 +0000 Received: (at 41617) by debbugs.gnu.org; 31 May 2020 01:21:55 +0000 Received: from localhost ([127.0.0.1]:59445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfCfj-00006H-G5 for submit@debbugs.gnu.org; Sat, 30 May 2020 21:21:55 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:44601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfCDv-0007rN-RX for 41617@debbugs.gnu.org; Sat, 30 May 2020 20:53:12 -0400 Received: by mail-ed1-f52.google.com with SMTP id l1so3739266ede.11 for <41617@debbugs.gnu.org>; Sat, 30 May 2020 17:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/uPl8sGnOZz4+4LgcNAY/mokjMLfxRLdB/oL1JKy0EU=; b=Q6xnJm5kUl4KO4rOphph+iGEesIOqcEtpAXPjjMlKqfhiV+x9d7IsWL5j98xmvD+3G 9l4587wINGxtrsyPvZW7H5GdmdGHT0b5hYYQEFzYgtlSJ5eOUTzfNsjJNQlbuQjmgc5Z kIbsomtFUQbOhPmAawGrBGC714mKUxFIoZULQFCcrJjeaqReks4Ri1F/DeDqIsKzMeXD k8OpRyu8va9X3taholofo6c+bv5jtWrr5f2lQabhL+9/ZIVv54qbQ8FBJkMGq0ShlQsj cYh+AB5TqVfFfgbyskN+G9NWFdv/mPOMJIfr4hsv1zMWP3Z5+fIKGapvRwA3SEiyZLM1 BXvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/uPl8sGnOZz4+4LgcNAY/mokjMLfxRLdB/oL1JKy0EU=; b=VWyspcScbQqFq66t4OiKp6gTw3vBD0J+zuq54QwTWuK2zrWdG1r00mAQukm06ZWt2B zUOITheA1oAc3B7buPdgSIvQzJU99v5CF7UM3GHbxxtfPJFBZphslTN80JglxfjT4OII Yxbot0vdjxx8UgtJL8sQ1bgXBpe8EC3liZ8EdrTttpEIqwFACKHdJi5VkNDCl+2q0fPK gMAo1aRnbFs30Wql0vrWktuQMf4me8MuGu0/PahoS/gPXdYfcu6Qa/LIxExac3DEUWC0 fqyh8sWfLLs2andUSmEGS08S9p1CzNJhAZyaOqygLzrHwTx/6Dr3+HNl/VYcVtIiwqwE r9lg== X-Gm-Message-State: AOAM530jKGllyfSoaN7q7GSbFWZipfRQIKvDAAi+XtFX4sce7D/qHfqR pLnMDWYQXXhPFuPFKJxqdqi4KjHXFA7vwhihXQ== X-Google-Smtp-Source: ABdhPJx6m843Jfc4BIq0GZqwYO3ZrpICuuYym190fNDXMV9QCNHyPMwOYvu2EtVXRf2IZiUkLcFHS7G/EPwSd2qvj8k= X-Received: by 2002:a05:6402:155:: with SMTP id s21mr14874347edu.144.1590886385868; Sat, 30 May 2020 17:53:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Anurag Kumar Date: Sun, 31 May 2020 06:22:53 +0530 Message-ID: X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sat, 30 May 2020 21:21:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-sed@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2020 01:22:03 -0000 Thank you for your response. I got the issue as in my case the command i was using to get the ip, the ip is coming as array of two ip which was causing the problem. On Sun, 31 May 2020, 01:07 Assaf Gordon, wrote: > tag 41617 moreinfo > stop > > Hello, > > On 2020-05-30 9:37 a.m., Anurag Kumar wrote: > > I am getting an issue when using [sed -i.bak "s/localhost/$ip/" > > filepath] it is not able to replace the ip value in the concerned file. > > To help diagnose this issue, we'll need a bit more information, e.g.: > What is the content of the file before sed ? > what is the content of the file after sed ? > what is the content of the file you expected to see? > are there any errors printed to the screen? > what version of sed are you using? > > For example, the following sequence works for me: > > $ echo "hello localhost server" > tmp > $ ip=1.2.3.4 > $ sed -i.bak "s/localhost/$ip/" tmp > $ head tmp tmp.bak > ==> tmp <== > hello 1.2.3.4 server > > ==> tmp.bak <== > hello localhost server > > regards, > - assaf > >