sed查找替换空行

1,复制一个带有空行的文件,或者创建一个

  cp /etc/profile  .

  cat profile

  

  对空行进行替换

   cat profile | sed -nr 's@^[^$]@@p'

   

猜你喜欢

转载自www.cnblogs.com/api5253/p/13172706.html
今日推荐