Posted By

jturmel on 07/11/09


Tagged

comment sed uncomment


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

tazjel


sed script to comment/uncomment every line in a file


 / Published in: Bash
 

  1. # comment
  2. sed -i 's/^/#/g' /example/file/here.txt
  3.  
  4. #uncomment
  5. sed -i 's/^#//g' /example/file/here.txt

Report this snippet  

You need to login to post a comment.