[Solved] Issue with grep

Hi everyone
I am trying to write a script to check if file systems are mounted, and also validate the permission; then do a whole bunch of other things. I am facing a problem with grep. For example, if the mountpoints are:

 
/dev/XYZ_lv      /abc/XYZ      jfs2   Nov 25 20:36 rw,log=/dev/loglv04
/dev/XYZtrace_lv /abc/XYZ/folder1 jfs2   Nov 25 20:36 rw,log=/dev/loglv04
/dev/XYZdata3_lv /abc/XYZ/folder2 jfs2   Nov 25 20:36 rw,log=/dev/loglv04
/dev/XYZdata2_lv /abc/XYZ/folder3 jfs2   Nov 25 20:36 rw,log=/dev/loglv04

If I use:

 
mount | grep -x "/abc/XYZ" 

I get the whole list, not only the first line. I also tried sed, but no success.

mount | grep '/abc/XYZ '

Try:

mount | grep "/abc/XYZ[^/]"

Exact string search in field 2

awk '$2=="/abc/XYZ"'

Thanks a lot everyone; both solutions from in2nix4life and bartus11 worked for me.