1、grep -v '^$' 1.txt
2、sed '/^$/d' 1.txt
3、awk '!/^$/' 1.txt
awk NF 1.txt
4、cat 1.txt | tr -s '\n'
Linux删除文件内空行
猜你喜欢
转载自www.cnblogs.com/wangylblog/p/13388404.html
今日推荐
周排行