Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

script involving bdf command

SOLVED
Go to Solution
Trusted Contributor Trusted Contributor

script involving bdf command

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 129256 1952672 6% /
/dev/vg03/lvol1 105775104 79229992 26368480 75% /devdata
/dev/devdatareplicate/lvol1
53018624 48677552 4311432 92% /devdatarep

how to get info of %used and its Mounted on in script? notice that /dev/devdatareplicate/lvol1 is one line, its' info is in another line while /dev/vg00/lvol3 has everything in one line. Thanks. JG
1 ACCEPTED SOLUTION
Honored Contributor Honored Contributor

Re: script involving bdf command

Minor update to my last post...so use the command posted below:

# bdf | awk '{if(NF==1) getline m;gsub(" +"," ",m);print $0" "m;m=""}'
4 REPLIES
Highlighted
Acclaimed Contributor Acclaimed Contributor

Re: script involving bdf command

Hi John:

Bill Hassell's 'bdfmegs' script addresses this issue and much more:

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262&admit=109447627+120170...

Regards!

...JRF...
Honored Contributor Honored Contributor

Re: script involving bdf command

bdf | awk '{if(NF==1) getline m;gsub(" +"," ",m);print $0m;m=""}'

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 129256 1952672 6% /
/dev/vg03/lvol1 105775104 79229992 26368480 75% /devdata
/dev/devdatareplicate/lvol153018624 48677552 4311432 92% /devdatarep
Honored Contributor Honored Contributor

Re: script involving bdf command

Minor update to my last post...so use the command posted below:

# bdf | awk '{if(NF==1) getline m;gsub(" +"," ",m);print $0" "m;m=""}'
Trusted Contributor Trusted Contributor

Re: script involving bdf command

thanks for sharing the info.