I would like to columnize data from excel. I need to paste the data in a simple text file. Tabs need to be replaced with blanks. What I need is to be able to select the column width.How

enter image description here

cat mdhousenames.txt  | column -c7  -s \t  -x

How do I make this output nicely formatted with tabs expanded?

enter image description here If possible, I'd like to go with native macOS 10.10.5 software. bash terminal is fine.

I've seen: https://unix.stackexchange.com/questions/31239/how-to-expand-tabs-based-on-content but no w3m command. Where is a safe place to download, if this is the only way.

https://unix.stackexchange.com/questions/57222/how-can-i-use-column-to-delimit-on-tabs-and-not-spaces but the tabs are a fixed size. Can I make the tabs variable size?


 expand -t 16,29,34,50,57,72  mdhousenames.txt 

Note: the first column starts in the unmentioned column 1. So in this example, the second column starts in column 16.

  • Tabs are always a variable size. What they are expanded to depends on the viewer app. How are you using this file? – user151019 Feb 22 at 21:58
  • cat mdhousenames.txt | column -c7 -s \t -x How would I modify this to work? – historystamp Feb 22 at 22:26
  • I'm pasting it into TextWrangler/BBedit. – historystamp Feb 22 at 22:34
  • You said, "Tabs need to be replaced with blanks."... well what the heck are "blanks"!? – user3439894 Feb 23 at 5:04
  • 1
    @fd0 Nothing like a circular situation! ;-) – historystamp Mar 6 at 19:43

You must log in to answer this question.

Browse other questions tagged .