Need help in understanding File system utilization expression
Hi,
The below file system utilization check command is being used in one of the solution. df -k | awk '$1~/^\/dev\//{keep="y"}NF==1{arg1==$1}NF==5{if(keep="y")print arg1,$0;keep="n"}NF==6{if(keep=="y")print;keep="n"}' I need to understand how the above expression is working. I do understand that it is concatenates two lines into one if the file system utilization is broken into two lines. The rest I'm unable to understand. |
Quote:
Code:
$1~/^\/dev\//{keep="y"} # If the first field contains "/dev/" set keep to "y" It's a rather complex substitute for Code:
df -P -k | grep /dev/ |
All times are GMT -5. The time now is 04:48 AM. |