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

  cp /etc/profile  .

  cat profile

  sed查找替换空行

 

  对空行进行替换

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

   sed查找替换空行

 

相关文章: