Operating System - HP-UX
1760618 Members
3364 Online
108894 Solutions
New Discussion юеВ

Re: Reading in variables (system names) from OVO into a script.

 
SOLVED
Go to solution
Jeff Cline
Occasional Contributor

Reading in variables (system names) from OVO into a script.

I am trying to write a script that will be launched from OVO (Application Back) which will read in the selected nodes and run the script against each node (system). My questions is how do I get the variables assigned because the number of nodes can change each time you run the script. OVO will launch the script and then send the selected nodes name to the script but I do not know how to read in the names. Any help would be appreciated.
Thanks!
Jeff (new to scripting)
4 REPLIES 4
Vicente Sanchez_3
Respected Contributor

Re: Reading in variables (system names) from OVO into a script.

Hi,

In HP-UX you can use hostname command. This shows you the name of the machine.

Regards, Vicente.
Ralph Grothe
Honored Contributor

Re: Reading in variables (system names) from OVO into a script.

Sorry, don't know the acronym OVO (blush), but assigning the node name to a variable is easy.

e.g.

POSIX shell (i.e. standard HP-UX sh)

node=$(/usr/bin/uname -n)

or

node=$(/usr/bin/hostname)

in other shell you may have to use backticks instead of $(...)

node=`/usr/bin/uname -n`


If you like Perl you can either use

use POSIX;

my ($node) = (POSIX::uname)[1];


or

use Sys::Hostname;

my $node = hostname;

HTH
Madness, thy name is system administration
Wodisch
Honored Contributor
Solution

Re: Reading in variables (system names) from OVO into a script.

Hi Jeff,

in Opc/ITO/VPO/OVO the "Applications" in your "Application Bank" get the names of the selected "Managed Nodes" passed over in the variable "$OPC_NODES".
So within your script you do something like:

for node in $OPC_NODES
do echo "going for $node:"
# call your command here
echo "done with $node"
done

Find the details in the OVO "Application Integration Guide", chapter 3 (="Integrating External Applications into the VPO GUI")...

HTH,
Wodisch
Jeff Cline
Occasional Contributor

Re: Reading in variables (system names) from OVO into a script.

Thanks to everyone that responded!

Thank you Wodisch for YOUR help!!

Jeff