You're replying to a comment by Sydney.

Sydney Permalink
October 07, 2008, 07:23

Thanks so much Peter,

I am only ever using GNU AWK on Redhat or Ubuntu maybe Debian rarely. So I mutated the first into:

df -h | awk '/\// { if (strtonum($(NF-1)) >= 20) { print $NF ": " $(NF-1) } }'

I am guessing that strtonum function that you suggested takes it out of the string world. I was trying to compare a string to a number.

The RegEx /\// found all mounts.

df output is not constant in Red Hat with long mount names


Who knew? So I changed the code to work backwards from the last field.

Thanks a bunch this was an interesting experiment for me that I may turn around and tweak for production.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "coding_92": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.