I have list/array, for example the $PATH env variable, when you do echo $PATH it prints
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /usr/local/MacGPG2/bin /usr/texbin /usr/local/go/bin
I would like this to be formatted in columns like below, so don’t have to scroll up down much. The $PATH variable is just an example, I would like to way to be able to do it with any list.
/usr/local/bin /usr/sbin /usr/local/MacGPG2/bin
/usr/bin /sbin /usr/texbin
/bin /opt/X11/bin /usr/local/go/bin
I can print each item in the list in new row using a for loop but can’t figure out a way to do multiple columns. I know there is a column command but that doesn’t seem to do any thing. I’ve tried all the options like echo $PATH | column -c 5
echo $PATHgets you. And the list of commands isn't at all related to whatecho $PATHgets you. I'm confused. You want to print a display of some set of values in nicely formatted columns?echo $PATHon the fish shell.fishtag there at the end.