Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • This will improve things proportionally to how close is linenum2 to the beginning of the file. Thanks! Commented Mar 3, 2013 at 17:05
  • 6
    This improves nothing: “d Delete pattern space. Start next cycle.” – man sed. That means, the q will never be executed. Which is good, because otherwise the entire remaining part would be removed. Commented Mar 3, 2013 at 17:23
  • @manatwork you are right. Tried it out with no improvement in performance. Commented Mar 3, 2013 at 17:32
  • yes, of course. silly me. Commented Mar 3, 2013 at 19:09
  • 5
    Note that you can delete your own answer if you realise it's a mistake. Nothing wrong with that, quite the contrary. Commented Mar 3, 2013 at 20:29