HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- bdf output
Operating System - HP-UX
1833806
Members
3079
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 06:37 AM
02-08-2005 06:37 AM
bdf output
I have a bdf out as:
/dev/vg00/lvol5 20480 17700 2775 86% /home
/dev/vg05/lvoldata4
10485760 8440476 1917492 81% /data4
I am trying to awk '{print$5}' which is the percent used so I can incorporate that into a script file but $5 for the lvoldata4 lv is the /data4 field because lvoldata shifts the rest of the bdf to the next line. Does anyone know how I can make the 81% of /data4 come out of a $5 awk print statement?
/dev/vg00/lvol5 20480 17700 2775 86% /home
/dev/vg05/lvoldata4
10485760 8440476 1917492 81% /data4
I am trying to awk '{print$5}' which is the percent used so I can incorporate that into a script file but $5 for the lvoldata4 lv is the /data4 field because lvoldata shifts the rest of the bdf to the next line. Does anyone know how I can make the 81% of /data4 come out of a $5 awk print statement?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 06:43 AM
02-08-2005 06:43 AM
Re: bdf output
Don,
I'm attaching a script I got from Bill Hassell (I think) called bdfmegs. I believe it will clean up your formatting issues so you can print $5 and besides, it's nicer in megs!!
Pete
Pete
I'm attaching a script I got from Bill Hassell (I think) called bdfmegs. I believe it will clean up your formatting issues so you can print $5 and besides, it's nicer in megs!!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 06:49 AM
02-08-2005 06:49 AM
Re: bdf output
I don't have access to a Unix box at the moment (eek!), but I think this might work:
bdf | awk '/%/ { print $(NF-1) }'
David
bdf | awk '/%/ { print $(NF-1) }'
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 06:54 AM
02-08-2005 06:54 AM
Re: bdf output
Davids bdf script was what I was looking for.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP