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.

2
  • I made an update but still not working correctly in Ubuntu 12.04.. :( It looks like the line number part is not working correctly Commented Apr 13, 2016 at 9:23
  • I rejected Binod's suggested edit as it's not a logical error. Ghassan's original code uses the same approach as Barmar's answer – which works. The comments to Barmar's answer explain why the suggestion of replacing 1800 with $line deletes every other line and then exceeds the desired range. Commented Apr 13, 2016 at 9:37