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*

7
  • Just to mention it again. Line numbers are not a part of file :) Commented Oct 17, 2012 at 18:06
  • The paste command perfectly works, can you please give a little more explanation about it. The hyphens ??? Commented Oct 17, 2012 at 18:08
  • 3
    The hyphens mean "read from stdin". If the same input source is repeated, paste knows to read from it several times per row of output. Commented Oct 17, 2012 at 18:13
  • 1
    With respect to your cat argument. Does sed "N;s/\n/,/" file.in > file.out not work? Commented Oct 18, 2012 at 11:13
  • 1
    This type of construction is why I absolutely love the UNIX, "do one thing and do it well" mentality. This just about defines elegance and simplicity. Commented Jul 25, 2019 at 20:39