返回顶部

测试文件行数脚本

#!/bin/bash
linecount="$(wc -l $1|cut -d' ' -f1 )"
echo "$1 has $linecount lines."


 bash linecount.sh /etc/fstab
/etc/fstab has 15 lines.

posted @ 2020-06-09 10:04  九尾cat  阅读(130)  评论(0编辑  收藏  举报