Last active
January 30, 2018 19:01
-
-
Save rhogeranacleto/1bffce7b452c9a316835512a765453e0 to your computer and use it in GitHub Desktop.
Display a table with columns in shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
printf 'PID\tUSER\tAPPNAME\n' | |
printf '%s\t%s\t%s\n' "1" "john" "foo bar" | |
printf '%s\t%s\t%s\n' "12345678" "someone_with_a_long_name" "pop tart" | |
) | column -t -s $'\t' | |
# ref Patrick on https://unix.stackexchange.com/a/162916 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment