Quote:
Originally Posted by colucix
Try word boundaries:
Code:
sed 's/\b192.168.9.10\b/10.0.0.11/g' file
or
Code:
sed 's/\<192.168.9.10\>/10.0.0.11/g' file
|
Didnt work either:
# cat file1
192.168.9.100
192.168.9.10 hi hello
# sed 's/\b192.168.9.10\b/10.0.0.11/g' file1
192.168.9.100
192.168.9.10 hi hello
# sed 's/\<192.168.9.10\>/10.0.0.11/g' file1
192.168.9.100
192.168.9.10 hi hello