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*

4
  • Unfortunately this does not work. There are a whole bunch of lines added with seemingly arbitrary content, and in other lines the data is definitely matched wrongly. I updated my example to match my real data more closely. Commented Apr 10, 2020 at 9:19
  • @And it's mentioned that data should be tab-separated and only one tab between each column (as well as if it's empty). my answer doesn't change for your new updated sample as it is data type independent. Commented Apr 10, 2020 at 9:40
  • Yes, this is what I did. I have the information stored in an excel file and exported the sheet with tab-separation, if this is important. Commented Apr 10, 2020 at 9:44
  • @And OK, I think you need first do dos2unix filename (or tr -d'\r' <filename) then apply awk command above assuming you exported file in Windows Commented Apr 10, 2020 at 10:10