|
|
This script is flawed!
Hmm, well, could it be as short and sweet as this? Edited on May 09, '12 08:55:12PM by llee
I like it (shorter and simpler)
I tried your shorter version and indeed it works here too. I think the key to this story was to have just one list, the one generated by 'df -l'. Since you asked me (and I know that doesn't really matter anymore),
% df -hlg | awk -F/ '/disk*/ {print $5}'
LionHD
Spare
MacExt
SmallSave
and 'df -k | awk -F/ '/disk*/ {print $3}':
df -k | awk -F/ '/disk*/ {print $3}'
disk0s2 79203656 51490116 27457540 66%
disk2s2 365784156 332114676 33669480 91%
disk1s1 66559996 65618364 941632 99%
disk1s2 36141052 35825216 315836 100%
disk1s3 53588152 48312940 5275212 91%
disk3s1 256702603 251655316 5047286 99%
disk3s2 306239060 303196908 3042152 100%
disk3s3 35929372 34222232 1707140 96%
That's why it didn't work here. As a side note, there's a slight typo in the awk script regex, which should be /disk.*/ and not /disk*/ (luckily it doesn't change anything for the intended purpose). I'm glad you didn't take it the wrong way and that you came up with a really short solution, and I hope I didn't came off as being too pedantic. ;-) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.33 seconds |
|