get only first line using sed / awk
Hi I have a file which contains IP address like this
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
0.0.0.0
0.0.0.0
0.0.0.0
192.168.8.
0.0.0.0
192.168.8.
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
0.0.0.0
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
192.168.28
0.0.0.0
I want to get only first IP address. I know they are all same but I need only one ( in the bold) using sed/awk or any other comamnd..
Any help would be great.
Thanks.
Sam
|