- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- long lv names
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
06-28-2005 03:04 AM
06-28-2005 03:04 AM
/dev/vg01/test_oracle_db 311296 1181 290740 0% /oracle_db
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 03:26 AM
06-28-2005 03:26 AM
Re: long lv names
Modify the last line, the printf statement, to display/print any or all of the fields from the bdf command.
File attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 04:51 AM
06-28-2005 04:51 AM
Re: long lv names
I'm not sure I understand what you mean. Could you clarify what kind of scripting help you need preferably with examples.
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 06:23 AM
06-28-2005 06:23 AM
Solutionbdf | while read DEV KSIZE KUSED KFREE PCT MNT
do
if [ "$KSIZE" = "" ]
then
read KSIZE KUSED KFREE PCT MNT
fi
echo $DEV $KSIZE $KUSED $KFREE $PCT $MNT
done
Now, no matter whether the listing is one line or two lines, all the variables will be set correctly. The trick is testing for a null variable ($KSIZE) which will occur when the line is split.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 06:57 AM
06-28-2005 06:57 AM
Re: long lv names
NF<4 {saveit=$0;daflag=1;next;}
NF>4 {if (daflag)
{print saveit,$0;dflag=0;}
else
{print $0}
}
then:
bdf | awk -f concat.awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 06:58 AM
06-28-2005 06:58 AM
Re: long lv names
NF<4 {saveit=$1;daflag=1;next;}
NF>4 {if (daflag)
{print saveit,$0;dflag=0;}
else
{print $0}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 12:35 AM
06-29-2005 12:35 AM