Subject: bug#49092: Bug/Limitation of sed

From: Alice Golakiya <[email-masked]>
Date: Fri, 18 Jun 2021 11:45:35 +0530

Hi ,

└─$ sed --version
sed (GNU sed) 4.7

file "hosts":
ip1 == 10.0.0.1
ip2 == 10.0.0.100

command executed:
sudo -i sed -i 's/10.0.0.1/10.0.0.200/g' hosts

Output file :
ip1 == 10.0.0.200
ip2 == 10.0.0.20000

The change in ip2 is not expected and an invalid.

On Fri, 18 Jun 2021 at 11:41, Alice Golakiya <[email-masked]>
wrote:

> Hi ,
> └─$ sed --version
> sed (GNU sed) 4.7
> file hosts:
> ip1 == 10.0.0.1
> ip2 == 10.0.0.100