|
Advanced GREP technique ?
I've been doing quite a number of bash scripts in these last months of using linux. In most of them I make use of the 'grep' command. However I've encountered a situation where my basic knowledge of grep cannot help me that much. Suppose I have a table show below:
1,USA,aaa
2,USAX,bbb
3,USAY,ccc
What if I want to grep for the USA only? doing a normal grep "USA" will give you all the three entries, whereas doing grep -o "USA" will display nothing because the pattern "USA" is not alone....
Is there a way to go around it??
|