Hacker News new | ask | show | jobs
by c3RlcGhlbnI_ 3400 days ago
How much of the power of sed does it bring?

I feel like other sed expressions might be even more useful in this format. For example:

    200i #TODO optimize this
will insert a comment before line 200 and:

    s/.*goto.*/cowsay \0/e
    T
    s%^%//%
    s%\n%\0//%g
will take every line that contains a goto and replace it with a commented out cowsay version of itself.