I'm trying to run a monitoring script on our Solaris servers that uses the "uname -X" command, which isn't supported on the Solaris 5.5.1 server.
I've copied the uname executable from the 5.6 server to the 5.5.1 & it runs from the command line OK. But when run from the script I get no output returned. To simplify things, I've set up this test script :-
#!/bin/sh
/home/bb/bb/ext/uname -X
P=`/home/bb/bb/ext/uname -X`
echo "P=-${P}-"
& when I run it, I get :-
ncwcs36: bb # sh -vx test
#!/bin/sh
/home/bb/bb/ext/uname -X
+ /home/bb/bb/ext/uname -X
System = SunOS
Node = ncwcs36
Release = 5.5.1
KernelID = Generic_103640-31
Machine = sun4d
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 4
P=`/home/bb/bb/ext/uname -X`
+ /home/bb/bb/ext/uname -X
P=
echo "P=-${P}-"
+ echo P=--
P=--
Anyone got any ideas on why the P=`...` doesn't work?
Andrew (I'm sure it's something stupid) Clarke
One by one, the penguins steal my sanity.
I've copied the uname executable from the 5.6 server to the 5.5.1 & it runs from the command line OK. But when run from the script I get no output returned. To simplify things, I've set up this test script :-
#!/bin/sh
/home/bb/bb/ext/uname -X
P=`/home/bb/bb/ext/uname -X`
echo "P=-${P}-"
& when I run it, I get :-
ncwcs36: bb # sh -vx test
#!/bin/sh
/home/bb/bb/ext/uname -X
+ /home/bb/bb/ext/uname -X
System = SunOS
Node = ncwcs36
Release = 5.5.1
KernelID = Generic_103640-31
Machine = sun4d
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 4
P=`/home/bb/bb/ext/uname -X`
+ /home/bb/bb/ext/uname -X
P=
echo "P=-${P}-"
+ echo P=--
P=--
Anyone got any ideas on why the P=`...` doesn't work?
Andrew (I'm sure it's something stupid) Clarke
One by one, the penguins steal my sanity.