Problems in Usage of grep

Hi all,

I have a file resp_cde.ats which has values as:-
APPDIR=C:\Program Files\Cogny\cert
PUBSDIR=C:\Program Files\Cognoy\cert\documentation
TOURDIR=C:\Program Files\Cognoy\cert\tour
DATADIR=C:\Program Files\Cognoy\cert\data

Now I use the grep command in a shell script:-
x=`grep DATADIR /f/g/resp_cde.ats`

The value of x is printed as APPDIR=C:\Program Files\Cogny

But I want the entire path i.e. APPDIR=C:\Program Files\Cogny\cert

I have tried a lot of options but none is working.

Can anyone please help me out?

Vikas

I have executed the same script and it's working for me.
I do not see any issues with it. Check for whitespeace in the file.

Have u tried echo "$x" within the same script...???

You can also try with paths such as:-
APPDIR=C:\Program Files\Cogny\bce

In this case because of \b the output will be shown as:-
APPDIR=C:\Program Files\Cognce

But
APPDIR=C:\Program Files\wsr

works fine with the above grep command.

Can you please check these options once again please....