awk '/^UUID/{fs[$3]++}END{for(i in fs) {print i,fs[i]}}' /etc/fstab /^UUID/ 匹配确定行范围 转载于:https://www.cnblogs.com/S--S/p/10224459.html