Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Rosseaux BeRo1985

View GitHub Profile
View gist:c1373a49b8ed19499d8bc07eda95a382

This line will replace the last octet of ipv4 adresses in a given file with a zero:

sed -i '' -e 's/\(\([0-9]\{1,3\}\.\)\{3\}\)[0-9]\{1,3\}/\10/g' <filename>