Have you ever used the "column" command?

submitted by vkc via PeerTube@tinkerbetter.tube edited

tinkerbetter.tube/videos/watch/735e9783-3424-4e…

Yes, there's other tools that can make terminal output prettier on Linux. We all know that. But the "column" command is likely already there, on your system, waiting for you to use it.

With "column" you can get nice looking terminal output & JSON from terminal commands, without a lot of additional cruft!

I mentioned a few print materials in this episode, here's some links:
πŸ“– The AWK book: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7
πŸ“˜ The K/P UNIX book: https://archive.org/details/unixprogramminge0000kern
πŸ” 1979's "Password Security: A Case History" by Robert Morris and Ken Thompson, which talks about how password encryption evolved in early UNIX: https://rist.tech.cornell.edu/6431papers/MorrisThompson1979.pdf

And here's the "support the channel" links (my video isn't sponsored):
πŸ‘• Buy my nerdy ethernet t-shirt: https://vkc.sh/merch
✨ Join the Patreon (with Discord/Matrix benefits): https://patreon.com/VeronicaExplains
β˜• Or Ko-Fi if that's your jam (same benefits): https://ko-fi.com/VeronicaExplains

Chapters:
0:00 I say "greetings" and introduce the column command
0:58 Basic use of the column command
2:02 Piping more advanced commands into column
2:57 Column's table mode: unlocking power
4:18 Adding neat headers to our table so we can manipulate them
5:57 Getting JSON output from terminal commands using column
6:57 Conclusion: column is awesome

121

Log in to comment

6 Comments

@vkc This came up in a YT recommend. I've been using Linux for over 25 years and have never seen this command!

I use `cut` and it is clunky even for the subset of things it can do that `column` does better.

@vkc I always forget the name of column, (as well as comm), though I never forget the name of fold; those three commands are among my least used unix utils.

I think an AWK for beginners would be a cool video.

@vkc I really enjoy your videos, they're fun and informative and it's an absolute delight whenever there's a new notification

@vkc
AWK is a beast of a language that could do a lot it's just a bit too much for me.
I would like to see an AWK for beginners video that would be very helpful, especially because you can explain it I think in a more understandable and noob friendly way.

@vkc love your videos! they're super useful for someone like me who was never formally taught Linux and is learning on her own.