I am trying to display df -h command out in proper format, how can I display
each field of each record in a fixed length.
Say your input is
sAGFTaEH fsdjngjgtdjkmh fsdgjrutfdhj fsdghyfjj
FDSHF fsfrgtr grsdht htdh
sAGFTaEH fsdjngjgtdjkmh fsdgjrutfdhj fsdghyfjj
FDSHF fsfrgtr grsdht htdh
sAGFTaEH fsdjngjgtdjkmh fsdgjrutfdhj fsdghyfjj
FDSHF fsfrgtr grsdht htdh
use:
$awk '{printf "%-20s %-20s %-20s %-20s\n",$1,$2,$3,$4}' $INPUT_FILE
and check for yourself !!!!!