Search Results

Search: Posts Made By: Shreyas N
3,188
Posted By RudiC
How about df -kP /home | awk 'NR>1 {print ($5+0 >...
How about df -kP /home | awk 'NR>1 {print ($5+0 > 80)?"exceeds":"doesn''t"}'
3,188
Posted By RudiC
NR > 1 skips the first (= header) line in awk....
NR > 1 skips the first (= header) line in awk. shell's parameter expansion ${percent%*%} (no "a"!) removes the trailing % sign.

It will not, due to syntactical and semantical errors:
- IF...
3,188
Posted By MadeInGermany
You better use df -kP or df -k in a script. The...
You better use df -kP or df -k in a script.
The % in bash/ksh/ash/psh can be chopped off.
percent=`df -kP /home/. | awk 'NR>1 {print $5}'`
percent=${percent%*%}
or
percent=`df -kP /home/. |...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy