All Questions
76
questions
17
votes
3
answers
59k
views
Remote for-loop over SSH
I have the following in a script
for server in ${servers[@]}; do
echo ${server}
ssh user@${server} "for i in /tmp/foo* ; do echo ${i}; done"
done
But it doesn't work. Weird thing, I see $I ...