Shell Removing Tabs/Spaces

前端 未结 6 1739
醉酒成梦
醉酒成梦 2021-02-20 18:45

I\'ve used a grep command with sed and cut filters that basically turns my output to something similar to this

    this line 1


    this line 2


    another li         


        
6条回答
  •  礼貌的吻别
    2021-02-20 19:05

    Use grep "^." filename to remove blank lines while printing.Here,the lines starting with any character is matched so that the blank lines are left out. ^ indicates start of the line. . checks for any character.

提交回复
热议问题