Need help with SED for replacing an IP

I need some advice to replace 10.183.x.x with 10.174.17.55 in a file containing multiple 10.183.x.x.

Any help would be highly appreciated.

$ cat input
10.183.12.13
10.183.100.100
10.10.10.10
10.145.123.123
10.183.1.1
$
$ sed 's:10\.183\.[0-9]\{1,3\}\.[0-9]\{1,3\}:10.174.17.55:g' input
10.174.17.55
10.174.17.55
10.10.10.10
10.145.123.123
10.174.17.55
$
$
1 Like