bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41617: Bug.


From: Anurag Kumar
Subject: bug#41617: Bug.
Date: Sun, 31 May 2020 06:22:53 +0530

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@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
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]