Quote:
Originally Posted by druuna
EDIT: Added the previous missing Tapp part (sorry 'bout that).
|
No need to be sorry. I'm grateful for the help!
I changed my commands to something simple so I can start from scratch (See the various 'pwd' commands below).
I found that the first variable is being set on the remote host. But the following three are being set on my local machine:
Code:
#!/bin/sh
for STORE in `cat /home/techs/upg-11.38.05.00/test.txt`
do
allVars=( $( ssh root@$STORE \
pwd ; \
pwd ; \
pwd ; \
pwd ) )
OSfr="${allVars[0]}"
Ship="${allVars[1]}"
WDvr="${allVars[2]}"
Tapp="${allVars[3]}"
echo $OSfr
echo $Ship
echo $WDvr
echo $Tapp
done
Here's the output of the script:
Code:
[techs@ts-01 scripts]$ ./allVars-script.sh
/root
/home/techs/scripts
/home/techs/scripts
/home/techs/scripts
The first 'pwd' comes back with 'root' (As it should per the remote host).
The next 3 'pwd' commands comes back with '/home/techs/scripts', which is where I am working on my local box. So after executing the first command correctly, the script is leaving the remote host and executing the latter 3 locally.
Is there anything off hand that you can see that might be resulting in this action? Thanks again for getting me this far. I'll keep hammering at it. Keith