怎样取得文件行数
sed -n '$=' filename
grep '.*' -c filename
perl -ne 'END {print "$i"} ++$i' filename
perl -ne 'END {print $.."\n"}' filename
awk 'END{print NR}' filename
awk '{print NR}' filename |tail -n1
grep -n "" filename|awk -F: '{print '}|tail -n1
wc -l filename|awk '{print }'
cat filename |wc -l
ruby -e 'p open("filename").read.count("\n")'