Linux shell] grep command to find an exact match string

demand:
Finding an exact match of a string
 
Exact match:
E.g:
In extracting the character string "48", such as 484 and returns a result 483 comprising the like with "48" other strings, in fact, should be accurately extract only contains the row 48.
Use grep extraction exact match for an effective way is added before extraction string \ <, after adding the extraction string \>. Suppose now that the precise extraction 48,
Methods as below:
#grep ' \ <48\>' filename

Guess you like

Origin www.cnblogs.com/mingzhang/p/11002241.html
Recommended