Skip to main content
sort -u; that was 'add'; you can 'add' yourself
Source Link
user313992
user313992

Your avoidance of awk needs some rationale in the question, but anyways, here you go:

$ cut -d, -f2,5 file | egrep -wo '([0-9]{1,3}[.]){3}[0-9]{1,3}'
6.5.8.12
66.55.89.12
19.13.13.159
13.13.173.59
14.19.232.42
141.101.196.40
11.01.196.0

If you want the output sort+uniq'ed, you can add yourself a | sort -u at the end of the pipeline ;-)

Your avoidance of awk needs some rationale in the question, but anyways, here you go:

$ cut -d, -f2,5 file | egrep -wo '([0-9]{1,3}[.]){3}[0-9]{1,3}'
6.5.8.12
66.55.89.12
19.13.13.159
13.13.173.59
14.19.232.42
141.101.196.40
11.01.196.0

Your avoidance of awk needs some rationale in the question, but anyways, here you go:

$ cut -d, -f2,5 file | egrep -wo '([0-9]{1,3}[.]){3}[0-9]{1,3}'
6.5.8.12
66.55.89.12
19.13.13.159
13.13.173.59
14.19.232.42
141.101.196.40
11.01.196.0

If you want the output sort+uniq'ed, you can add yourself a | sort -u at the end of the pipeline ;-)

Source Link
user313992
user313992

Your avoidance of awk needs some rationale in the question, but anyways, here you go:

$ cut -d, -f2,5 file | egrep -wo '([0-9]{1,3}[.]){3}[0-9]{1,3}'
6.5.8.12
66.55.89.12
19.13.13.159
13.13.173.59
14.19.232.42
141.101.196.40
11.01.196.0