The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: grep question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-29-2008
melanie_pfefer melanie_pfefer is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 234
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