When I put this in my script, it didn't work right
# Change the ownership
chown_command=""
for tmp in $tempvar
do
chown_command="${chown_command}=chown $UID $tmp;"
done
for server3 in $list
do
ssh -q $id@$server3 "${chown_command}"
echo "Changing ownership on $server3"
echo " "
done
When it goes down the sever list, and comes to
ssh -q $id@$server3 "${chown_command}"
Instead of running the "${chown_command}"
It just puts me at a prompt, I just want it to run the chown command!
+ chown_command=
+ ssh -q id@serverx
d@serverx:~>
accessid@serverx:~>
accessid@serverx:~> exit
logout
+ echo Changing ownership on x
Changing ownership on x
+ echo
If you see, in the bolded area, it makes me type exit - and it doesn't work. what's going on????