I have a data file that has names of varying lengths that are listed in columns. ie:
Ranjit Singh Dean Johnson Ken Whillans Karen Thompson Peter Robertson Rich Gardener Sandeep Jain Ken Whillans John Thompson Cher Cher Karen Patel John Jacobs Davinder Singh Dean Johnson Sandeep Jain Karen Thompson John Thompson Rich Gardener Peter Robertson Karen Patel Ranjit Singh
I'm trying search the left column and print out the corresponding with it on the right. i.e A search for 'ohn' would only print out:
John Thompson Cher John Jacobs Davinder Singh Dean Johnson Sandeep Jain
(All the names should be in perfect column columns with the first letters lining up with each other)
I've tried cutting each into temp files and grep'ing those files, but I can't find out a way to only output the info that I want.
Any help would be appreciated.