GNU bug report logs - #41617
Bug.

Previous Next

Package: sed;

Reported by: Anurag Kumar <anuragsinghsmth <at> gmail.com>

Date: Sat, 30 May 2020 16:25:01 UTC

Severity: normal

Tags: moreinfo

To reply to this bug, email your comments to 41617 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-sed <at> gnu.org:
bug#41617; Package sed. (Sat, 30 May 2020 16:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anurag Kumar <anuragsinghsmth <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-sed <at> gnu.org. (Sat, 30 May 2020 16:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anurag Kumar <anuragsinghsmth <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: Bug.
Date: Sat, 30 May 2020 21:07:51 +0530
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-sed <at> gnu.org:
bug#41617; Package sed. (Sat, 30 May 2020 19:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 41617 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Anurag Kumar <anuragsinghsmth <at> gmail.com>, 41617 <at> debbugs.gnu.org
Subject: Re: bug#41617: Bug.
Date: Sat, 30 May 2020 13:37:43 -0600
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





Added tag(s) moreinfo. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 30 May 2020 19:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-sed <at> gnu.org:
bug#41617; Package sed. (Sun, 31 May 2020 01:22:02 GMT) Full text and rfc822 format available.

Message #13 received at 41617 <at> debbugs.gnu.org (full text, mbox):

From: Anurag Kumar <anuragsinghsmth <at> gmail.com>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 41617 <at> debbugs.gnu.org
Subject: Re: bug#41617: Bug.
Date: Sun, 31 May 2020 06:22:53 +0530
[Message part 1 (text/plain, inline)]
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, <assafgordon <at> gmail.com> 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
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 16 days ago.

Previous Next


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