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.

Required fields*

6
  • And what if want to add line number 1 to the first 100 lines, and number 2 to the second 100 lines and so on up to line number 100? Commented Oct 12, 2016 at 11:25
  • @user5694985, from that spec, it's unclear which numbers are to be added. That is if the input file was the output of seq 77 10077, did you wish for the first line of output to be 1:78 or 1:154 or something else? Please elaborate. Commented Oct 12, 2016 at 11:42
  • I would like to add number 1 to the first 100 lines, number 2 to the second 100 lines, and so on: Commented Oct 12, 2016 at 11:46
  • I would like to add number 1 to the first 100 lines, number 2 to the second 100 lines, and so on: Commented Oct 12, 2016 at 11:47
  • @agc, The way I read the question, I understood the purpose was to just add the line numbers as a new field in the front of the line. Not anything having to do with numerical addition of the values. Commented Oct 12, 2016 at 12:26