Find Exact word in file

Hi ALL,

I want to search one string �20 � i.e 20 with space.
But my file where I am searching this �20 � contain some data like

120 before image file truncated
220 Reports section succeeded
20 Transaction database .prd stopped
220 Reports section completed.

When I search for the string �20 � it give me all data like

120 before image file truncated
220 Reports section succeeded
20 Transaction database .prd stopped
220 Reports section completed.

I want output only this line.

20 Transaction database .prd stopped

I don't want other lines.
Please suggest some code. I am using Ksh.

grep '^20 ' myfile

to search only 20

$ grep '\<20\>' file

Jaduks
I think he wants only 20 at the start of a line - your regex finds the word 20 anywhere on the line.

true. Thanks :slight_smile:

grep '^20 ' myfile
this code perfectly work as i want.

Thanks jim.