题解 | #去掉空行#
去掉空行
http://www.nowcoder.com/practice/0372acd5725d40669640fd25e9fb7b0f
NR=cat ./nowcoder.txt|wc -l
for ((a=1;a<=$NR;a++))
do
data=awk -n "NR==$a" ./nowcoder.txt
if [ $data ];then
echo $data
fi
done
去掉空行
http://www.nowcoder.com/practice/0372acd5725d40669640fd25e9fb7b0f
NR=cat ./nowcoder.txt|wc -l
for ((a=1;a<=$NR;a++))
do
data=awk -n "NR==$a" ./nowcoder.txt
if [ $data ];then
echo $data
fi
done
相关推荐