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
  • Why not write the file with first_column,second_column,third_column triples and then add the final zero with <input.txt sed -e 's/$/,0/'? Commented Mar 8, 2017 at 18:44
  • Dear Gregory, thanks for the hint, but for the final goal this solution is not really efficient. Thanks again! Commented Mar 9, 2017 at 9:28