skip to main content

SAP NetWeaver Newbie

Fixing bdf output

The output of the bdf command is not formatted in a reader friendly fashion. For example the output of bdf sometimes writes the disk usage details in two lines

Filesystem          kbytes    used   avail %used Mounted on
                   8388608 3450677 4670062   42% /sapmnt

To format the output properly, use the following awk trick:
 bdf | awk '{if (NF==1) {line=$0;getline;sub(" *"," ");print line$0} else {print}}'

The output know will look like this:
Filesystem              kbytes    used   avail %used Mounted on
/dev/sapsidvg/lvsapmnt 8388608 3450680 4670058   42% /sapmnt

No comments:

Post a Comment

Email Subscription

Get every new post into your inbox by subscribing us.

Want a reason to subscribe?
1. This sitemap might convince you to subscribe.
2. We do not misuse email IDs. We respect privacy.

© 2008 - 2017 sapnwnewbie. All rights reserved.