I'm not the most experienced when using unix commands and have come across a little problem.
I have a very simple database (named a1.db) set up like this:
name address phone#
name1 address1 phone1
where each field is separated by a tab ("\t").
Now what i wanted to do is search the name column for a match using grep, and came up with "cut -f1 a1.db | grep name1" and that works fine. However when it finds a match i wanted it to print the whole line rather than just the part that was cut. So instead of the out put being "name1" on a match, I'd like it to be "name1 address1 phone1" without complicating things too much.
Hope you understand what i mean. Any help is very much appreciated.
Thanks