grep question

hello people,

All my servers have 4 mounts with this norme. For example, if my hostname is siroe.

df -h | grep `hostname`

/dev/dsk/c1t3d0s6 404G 399G 800M 100% /siroe3
/dev/dsk/c1t2d0s6 404G 399G 800M 100% /siroe2
/dev/md/dsk/d6 20G 812M 19G 5% /siroe
/dev/md/dsk/d12 167G 164G 918M 100% /siroe1

I want to get only these:

/siroe3
/siroe2
/siroe1

how to do that?

thanks

df -h | grep `hostname` | sed -n -e "s#.* \(\/.*\)#\1#p"

Try this,

awk ' { if ( $5 ~ /100%/ ) { print $6 } }' /Your/input

Thanks
Nagarajan G

Try this:

df -h | grep `hostname` | awk '{if ( $5 ~ /100%/ ) print $NF}'