You're viewing a comment by Lee and its responses.

Lee Permalink
March 28, 2016, 20:32

If you add 0 to a field it's interpreted as a number. So

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

can be made to work in all awk's by

df -h | awk '/dev/ { if (($5 + 0) >= 20) { print $NF ": " $(NF-1) } }'

Regards,
Lee

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

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

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