![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep question. | saurabhsinha23 | UNIX for Dummies Questions & Answers | 3 | 12-11-2007 01:58 AM |
| Question about GREP | Adriel | UNIX for Dummies Questions & Answers | 16 | 03-22-2007 08:03 AM |
| Another grep question | kingdbag | UNIX for Dummies Questions & Answers | 6 | 10-27-2006 01:56 AM |
| grep & sed question | der Kopf | Shell Programming and Scripting | 1 | 11-22-2004 04:49 AM |
| Grep question | eloquent99 | UNIX for Dummies Questions & Answers | 4 | 02-20-2003 10:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
Try this:
Code:
df -h | grep `hostname` | awk '{if ( $5 ~ /100%/ ) print $NF}'
|
| Sponsored Links | ||
|
|