Deleting a line in a text file

前端 未结 2 827
南笙
南笙 2021-01-27 09:25

Ok, I tried to delete lines that contain -- from a file. The file looks like this:

  -----------------------------------------------------------------
  Lorem ip         


        
2条回答
  •  北海茫月
    2021-01-27 09:40

    As others said, you can do it with grep, but if you want to do it completely in Ruby, then look at this question, the first answer should help you.

提交回复
热议问题