0
Here is the table...
Group Name Designation
2 (John) Front End Developer
12 (Jim) Back End Developer
8 (Jill) Full Stack Developer
21 (Jack) Front End Developer
2 (James) Front End Developer
12 (Jane) Full Stack Developer
I want to extract person names belong to same group. Here John and James belong to group 2. What (combination of) bash commands or script should I use to display the following output
John
James
I used different types of grep combinations. But doesn't seem to work.
Let's see the various combinations you tried. – Michael Vehrs – 2016-06-15T06:03:04.210
I tried this...
grep -w "2" file.txt | awk '{print $2}'
This printed names along with braces like this...(John) (James)
I couldn't get rid of those parenthesis – Nayab Basha Sayed – 2016-06-15T08:25:19.843