- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: want only two field in bdf output.
Operating System - HP-UX
1752580
Members
4818
Online
108788
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
Discussions
Discussions
Forums
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
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
тАО04-30-2010 12:26 AM
тАО04-30-2010 12:26 AM
want only two field in bdf output.
Hi,
I am trining to make a script which will show me only mountpoint and %used. I tried using bdf |awk '{print $5 , $6}' but as bdf output for one mountpoint is coming in two line so i am not able to do.
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 5144576 272768 4833832 5% /
/dev/vg00/lvol1 2097152 334152 1749296 16% /stand
/dev/vg00/lvol8 12288000 5484256 6752136 45% /var
/dev/vg00/lvol7 8192000 3444072 4710880 42% /usr
/dev/vg00/lvol6 8192000 2062232 6082112 25% /tmp
/dev/vg00/lvol5 10256384 5671680 4549056 55% /opt
/dev/vg00/lvol4 10256384 1534216 8654104 15% /home
/dev/vg00/lvol9 15728640 8342293 6924807 55% /app
/dev/vg00/secure 5144576 18754 4805464 0% /.secure
/dev/vgosmapp/lvol1
35323904 10801593 22989765 32% /osmapp
I am trining to make a script which will show me only mountpoint and %used. I tried using bdf |awk '{print $5 , $6}' but as bdf output for one mountpoint is coming in two line so i am not able to do.
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 5144576 272768 4833832 5% /
/dev/vg00/lvol1 2097152 334152 1749296 16% /stand
/dev/vg00/lvol8 12288000 5484256 6752136 45% /var
/dev/vg00/lvol7 8192000 3444072 4710880 42% /usr
/dev/vg00/lvol6 8192000 2062232 6082112 25% /tmp
/dev/vg00/lvol5 10256384 5671680 4549056 55% /opt
/dev/vg00/lvol4 10256384 1534216 8654104 15% /home
/dev/vg00/lvol9 15728640 8342293 6924807 55% /app
/dev/vg00/secure 5144576 18754 4805464 0% /.secure
/dev/vgosmapp/lvol1
35323904 10801593 22989765 32% /osmapp
- Tags:
- bdf
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2010 12:35 AM
тАО04-30-2010 12:35 AM
Re: want only two field in bdf output.
Whit this, you will have only one line for each FS:
# bdf | awk '{if (NF==1) {line=$0;getline;sub(" *"," ");print line$0} else {print}}'
Regards,
# bdf | awk '{if (NF==1) {line=$0;getline;sub(" *"," ");print line$0} else {print}}'
Regards,
"When you look into an abyss, the abyss also looks into you"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2010 12:43 AM
тАО04-30-2010 12:43 AM
Re: want only two field in bdf output.
Hey,
Thanks aa ton...the output is coming in one line so i can use awk now.
Thanks aa ton...the output is coming in one line so i can use awk now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2010 12:48 AM
тАО04-30-2010 12:48 AM
Re: want only two field in bdf output.
Or simply:
bdf | awk 'NF != 1 {print $(NF-1), $NF}'
bdf | awk 'NF != 1 {print $(NF-1), $NF}'
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP