I have a text file and the data inside has format like (name age country):
michael jordans 25 US
adam smith 30 UK
chris wood ABC 22 Aus
if I use command: cat text.txt | awk {'print $1'}
--> it will print:
michael
adam
chris
but I want to print the full name:
michael jordans
adam smith
chris wood ABC
Which command should I use ?
We can change the format data like:
michael jordans|25|US
adam smith|30|UK
chris wood ABC|22|Aus