[root@shell shell-2-25-3]# df -m /boot
文件系统 1M-块 已用 可用 已用% 挂载点
/dev/sda1 1014 171 844 17% /boot[root@xxx]# df -m /boot | awk 'NR==2 {print $4}'
844
awk命令可以对文本进行高效的格式化、筛选、计算和转换等操作。
参数说明:
NR==2 #指明输出文本的第二行
print $4 #指明输出文本的第二列
print和printf的区别:print自动换行,printf不换行。

2万+

被折叠的 条评论
为什么被折叠?



