一.shell脚本
test.sh
#!/bin/bash
while read line
do
echo $line
done < demo.log
二.统计文件每行的长度
sh test.sh | awk '{print length($0)}'
一.shell脚本
test.sh
#!/bin/bash
while read line
do
echo $line
done < demo.log
二.统计文件每行的长度
sh test.sh | awk '{print length($0)}'