grep for "exact word"

Hi All,
Very GM

I am searching for a specific filesystem on a serevr,

like df -k "/"

i am geting an output also...
but when i am checking for somthing like /oramnt (which is not mounted currently)

so i am geting an out like this

df -k "/oramnt"
output of root...!

so i tried using some thing like this... df -k | grep "/oramnt$"
but again i am facing issue like..!

df -k | grep "/b2b$"
it's listing out for 2 file system... like /b2b nad /b2b/software... for 2 mountpoints..

Requrement is somthing like... i want search for exact mountpoint..!

could some one help me... please..!?

i cudnt understand exacly what u want....

but u can use grep -w to search for exact word....

hope it helps...

-anchal

Hi

I am not geting an out from the command grep -w

want to grep for grep "/b2b" but i am geting an o/p like
/b2b
/b2b/software
where i want to grep for the only first one...

please some one help me out....!

df -k |grep '\b2b$'

Hi It's listing out both yar

df -k | grep '/b2b$'

/b2b
/software/b2b

Could some one help me.. How can get it.....? Please i am tring this from long time..!

try putting word boundaries:

df -k | grep '\</b2b\>'

for your info i am using solaris 9

df -k | grep '\</b2b\>'

i am not geting anything for this... grep -w is working on linux..! :confused:

you could try something like:

df -kl | awk '$6=="/b2b"{print}'

or hacky spaces should work in some cases:

df -kl | grep  " /b2b"

or

df -kl | grep  " /b2b$"

HTH