1847694 Members
6256 Online
110265 Solutions
New Discussion

Scripting help please.

 
SOLVED
Go to solution
S-un-B-ix-S
Advisor

Scripting help please.

Hi,

I have 2 HPUX 11.11 running VxVm 3.5. I am trying to write a script that will output the following info into a text file.



I know I can get this info from bdf..but I am not just sure how to parse it.

Any help would be appreciated.

Thanks!
1 REPLY 1
James R. Ferguson
Acclaimed Contributor
Solution

Re: Scripting help please.

Hi:

A simple script like this shows the way:

# cat ./showmp
#!/usr/bin/sh
bdf | while read FS SZ X X X MP
do
echo "${FS} ${SZ} ${MP}"
done > $0.log

...run as:

# ./showmp

...your output will be in a file called './showmp.log' --- since $0 is the basename of the script as it runs.

You should also evaulate Bill Hassell's 'bdf' script since it address multi-line (split line) output and much, much more! :

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

By the way, you have not evaluated some of the responses to your previous questions. You can find those unevaluated responses in your profile:

http://forums12.itrc.hp.com/service/forums/publicProfile.do?userId=CA1308187&forumId=1

Regards!

...JRF...