From unknown Wed Jun 18 00:26:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41617 <41617@debbugs.gnu.org> To: bug#41617 <41617@debbugs.gnu.org> Subject: Status: Bug. Reply-To: bug#41617 <41617@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:14 +0000 retitle 41617 Bug. reassign 41617 sed submitter 41617 Anurag Kumar severity 41617 normal tag 41617 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 30 12:24:14 2020 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: Subject: Bug. To: bug-sed@gnu.org Content-Type: multipart/alternative; boundary="000000000000de452e05a6df5823" 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-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000de452e05a6df5823 Content-Type: text/plain; charset="UTF-8" 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 --000000000000de452e05a6df5823 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I am getting an issue when using=C2=A0 [sed -i.bak= "s/localhost/$ip/"=C2=A0 =C2=A0filepath] it is not able to repla= ce the ip value in the concerned file.

Thanks=C2= =A0
Anurag kumar
--000000000000de452e05a6df5823-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 30 15:37:54 2020 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) Subject: Re: bug#41617: Bug. To: Anurag Kumar , 41617@debbugs.gnu.org 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-Debbugs-Envelope-To: 41617 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 debbugs-submit-bounces@debbugs.gnu.org Sat May 30 21:21:55 2020 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: Subject: Re: bug#41617: Bug. To: Assaf Gordon Content-Type: multipart/alternative; boundary="000000000000e864c905a6e71948" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41617 X-Mailman-Approved-At: Sat, 30 May 2020 21:21:54 -0400 Cc: 41617@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000e864c905a6e71948 Content-Type: text/plain; charset="UTF-8" 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 > > --000000000000e864c905a6e71948 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for your response. I got the issue as in my cas= e the command i was using to get the ip, the ip is coming as array of two i= p which was causing the=C2=A0problem.

<= div dir=3D"ltr" class=3D"gmail_attr">On Sun, 31 May 2020, 01:07 Assaf Gordo= n, <assafgordon@gmail.com&g= t; wrote:
tag 41617 moreinfo
stop

Hello,

On 2020-05-30 9:37 a.m., Anurag Kumar wrote:
> I am getting an issue when using=C2=A0 [sed -i.bak "s/localhost/$= ip/"
>=C2=A0 =C2=A0filepath] it is not able to replace the ip value in the co= ncerned 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:

=C2=A0 =C2=A0$ echo "hello localhost server" > tmp
=C2=A0 =C2=A0$ ip=3D1.2.3.4
=C2=A0 =C2=A0$ sed -i.bak "s/localhost/$ip/" tmp
=C2=A0 =C2=A0$ head tmp tmp.bak
=C2=A0 =C2=A0=3D=3D> tmp <=3D=3D
=C2=A0 =C2=A0hello 1.2.3.4 server

=C2=A0 =C2=A0=3D=3D> tmp.bak <=3D=3D
=C2=A0 =C2=A0hello localhost server

regards,
=C2=A0 - assaf

--000000000000e864c905a6e71948--