Sample Header Ad - 728x90

Fixing sed expression

-1 votes
2 answers
135 views
I'm using "hosts" files from different sources and to unblock some sites i use the following SED code: sed -i '/0.0.0.0 internet.com/s/^/#/g' /etc/hosts Result: It puts # in front of 0.0.0.0 internet.com but also 0.0.0.0 internet.com.site I need to fix it.
Asked by superbyte (45 rep)
Jun 2, 2019, 07:39 PM
Last activity: Jul 13, 2025, 07:04 PM