Is there a way to comment/uncomment a shell/config/ruby script using command line?
$ comment 14-18 bla.conf $ uncomment 14-18 bla.conf
this would add or remove
# sign on
bla.conf on line
18. Normally I use
sed, but I must know the contents of those lines and then do a find-replace operation, and that would give a wrong result when the there are more than one needle (and we're only want to replace the N-th one).