Formatting BDF output

Hello people.

First of all I googled my problem and even found answers in this forum. Unfortunatelly my problem is not solved.

When the lenght of the filesystem is too big the output of bdf wraps into another line. e.g.:

Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  310384  732592   30% /
/dev/vg00/lvol1     799416   53712  665760    7% /stand
/dev/vg00/lvol8    9216000 2655072 6513104   29% /var
/dev/vg00/lvol9    3145728  597988 2388515   20% /var/adm/crash
/dev/vg00/lvol7    3145728 2708816  433504   86% /usr
/dev/vg00/lvol6    2097152 1124696  967984   54% /tmp
/dev/vg00/lvol5    3145728 2770200  372616   88% /opt
/dev/vg00/lvol4    1441792  853904  584120   59% /home
----------Problem begins--------------
/dev/vg00/lv_autosys
                   1474560  227936 1168774   16% /autosys
/dev/vg00/lv_app   8388608 7429882  903544   89% /app
/dev/vg00/lv_ctsausr
                    114688   41413   68752   38% /ctsausr
/dev/vg00/lv_tcpdump
                   5242880 1722651 3300221   34% /TCPDUMP
/dev/vg_HSE_EXTEND_2/lv_HSE_Data_s_21
                   105775104 84794184 20817016   80% /HSE/Data_s/21
/dev/vg_HSE_EXTEND_2/lv_HSE_Data_s_20
                   110362624 108250032 2096096   98% /HSE/Data_s/20
/dev/vg_HSE_EXTEND_2/lv_HSE_Index_18
                   70516736 67990232 2506776   96% /HSE/Index/18
/dev/vg_HSE_EXTEND_2/lv_HSE_Index_16
                   104857600 85977904 18732208   82% /HSE/Index/16
.
.
.

How do I solve this problem in order to create a nicely formated output ?

Thank you in advance.

Try:

awk 'NF==1{x=$0;next}x{$1=$1;printf x" "$0"\n";x="";next}1' file | awk '{printf "%-38s",$1;printf "%11s",$2;printf "%11s",$3;printf "%11s",$4;printf "%6s",$5;printf "  "$6"\n"}' -
awk 'NF==1{x=$0}NF>1 && !~/^\//{print x FS $0}NF>1 && /^\//{print}'

Try this

bdf | cat

Please look at:

and it looks like you will just want to set the first column to 60 instead of 30.

awk 'NF==1{getline n;$0=$0 FS n}{printf("%-40s%12s%12s%12s%7s %s\n",$1,$2,$3,$4,$5,$6)}'