以下为学习内容,也参考了网上的代码,并把我的调试好的结果展示出来,希望和我一样的新入门同学一些参考。
#! /bin/bash
percent=` df -h | awk '{if (NR>2){print $5""$6}}'|cut -f 1 -d '%' `
#loc=` df -h | awk '{if (NR>1){print $6}}'`
loc=` df -h | awk '{if (NR>2){print $5""$6}}'|awk '$1>'10| cut -f 2 -d '%'`
for i in $percent