这个统计其实很简单,就一行,把批量循环也记下来:
lines.sh
!/bin/bash # 51 us states DB=(ak al ar az ca co ct dc de fl ga hi ia id il in ks ky la ma md me mi mn mo ms mt nc nd ne nh nj nm nv ny oh ok or pa ri sc sd tn tx ut va vt wa wi wv wy) for i in "${DB[@]}";do echo ---------- $i ---------- wc -l /var/www/html/example.com/sites/$i.tsv done
评论