Here is my sample input file.
ip.txt:
john math
science
paul math
science
rosy math
jill science
rob math
science
hary math
Desired output:
john
paul
rosy
jill
rob
hary
When I use:
awk '{print $1}' ip.txt
My output is:
john
science
paul
science
rosy
jill
rob
science
hary
I don not want the second column values printed, I want the blank spaces to be printed out to a file.
How can I achieve this? I am using Solaris 5.10 with ksh.