If I run this
[root@central-server] # ssh remote-server 'du -sk /usr/platform/`uname -i`/'
174 /usr/platform/SUNW,Sun-Fire-V245
I get my output just fine,
However, if i try to do the same but populate a local variable within my script called for example 'result'
#!/bin/ksh
result=`ssh remote-server 'du -sk /usr/platform/`uname -i`/'`
echo $result
I get
[root@central-server] # ./test.sh
./test.sh[13]: /: cannot execute
./test.sh[13]: -i: not found
It looks like the `uname -i` is not getting run remotely, does anybody know how I can get this to be recognised by the remote box ?
Any help would be great
Cheers