Column formatting

Here is a quick tip on how to make the output of some tools prettier, Clinica Stomatologie Bucuresti curs valutar crama lechinta Psiholog Cluj for example we can use the mount command which by default looks like this:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
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)
none on /dev type devtmpfs (rw,mode=0755)

Using the column command with the -t option we can apply some formatting so it is more readable:

$ mount | column -t
 
/dev/sda1  on  /                         type  ext4        (rw,errors=remount-ro)
proc       on  /proc                     type  proc        (rw,noexec,nosuid,nodev)
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)
none       on  /dev                      type  devtmpfs    (rw,mode=0755)

Much better, isn’t it? Man page for the column command: http://man7.org/linux/man-pages/man1/column.1.html

Tags: formatting, Linux, tools

Popular posts