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*

5
  • 3
    --c2p for short. Also mlr --c2t cat file | column -t -s $'\t' (transforming it to TSV and then using column as the user was initially trying) Commented Mar 10, 2023 at 18:01
  • you can ask. But it's a bit strange, because I said so: "Miller". The installation instructions are linked in my answer. Commented Mar 10, 2023 at 18:06
  • @Kusalananda converting comma separators to tabs then piping to column to format based on tab separation would fail if the input contained tabs so it'd just be shifting the problem. Commented Mar 11, 2023 at 12:12
  • @EdMorton Absolutely, I should have said that I assumed the data looked like what it did in the question (which does not look like it contains embedded tabs). Commented Mar 11, 2023 at 14:34
  • @Kusalananda yeah, I get it, but tabs are pretty common characters and the OP shows strings like "some, other, stuff" in their input.... I had actually looked up the man page for column hoping to find a -z or similar option that'd let us use \ns as the field separators and \0s as the record terminators (assuming mlr can output such records, which I don't know if it can or not) but no such luck. Commented Mar 11, 2023 at 16:15