I have some code that prints select columns from the output of lsblk. However, the spacing in the result makes it hard to read. Is there anyway to do this while maintaining the white space?
echo "`sudo lsblk | awk -F ' ' '{print $1 " " $4 " " $6 " " $7}'`"
output:
NAME SIZE TYPE MOUNTPOINT
sda 238.5G disk
├─sda5 68.6G part /
├─sda6 7.8G part [SWAP]
└─sda8 1000M part
sudo lsblk -o name,size,type,mountpoint? – steeldriver Nov 17 '17 at 03:58