Search This Blog

Monday, March 7, 2011

pretty printing for bash command outputs

Some commands like to print the output in a way that is hard to read. Try this 'column' tool that turns the unstructured output into a pretty printed output.

$ mount | column -t
/dev/sda2         on  /                         type  ext3                   (rw,relatime,errors=remount-ro)
proc              on  /proc                     type  proc                   (rw)
none              on  /sys                      type  sysfs                  (rw,noexec,nosuid,nodev)
none              on  /sys/fs/fuse/connections  type  fusectl                (rw)
none              on  /sys/kernel/debug         type  debugfs                (rw)
none              on  /sys/kernel/security      type  securityfs             (rw)
...

No comments:

Post a Comment