davysouthernboy
asked on
how do i make grep return only one match?
i have a variable that contains multiple matches.
RESULT = "Debra Jones Debra Jones Jonathon Taylor"
MATCH=`echo $RESULT | grep -i -o -h -f ncm.txt`
MATCH contains "Debra Jones Debra Jone" because ncm.txt is a list of names.
I need for grep to return only ONE match. How do I do this?
RESULT = "Debra Jones Debra Jones Jonathon Taylor"
MATCH=`echo $RESULT | grep -i -o -h -f ncm.txt`
MATCH contains "Debra Jones Debra Jone" because ncm.txt is a list of names.
I need for grep to return only ONE match. How do I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.