删除每行空白字符

sed -i 's/^[[:space:]]*//' user.txt

 

删除空白行

sed -i '/^$/d' user.txt

posted on 2018-02-28 10:31  jamezhan  阅读(112)  评论(0编辑  收藏  举报