7

Unix command to remove everything after first column

view full story
linux-howto

http://stackoverflow.com – I have a text file in which I have something like this- 10.2.57.44 56538154 3028 120.149.20.197 28909678 3166 10.90.158.161 869126135 6025 In that text file, I have around 1,000,000 rows exactly as above. I am working in SunOS environment. I needed a way to remove everything from that text file leaving only IP Address (first column in the above text file is IP Address). So after running some unix command, file should look like something below. 10.2.57.44 120.149.20.197 10.90.158.161 Can anyone please help me out with some Unix command that can remove all the thing leavin (HowTos)