Using EOF do/for script

view story

http://www.unix.com – I am trying to ssh to a remote server Using an EOF script and run a do/for loop. I have been able to do the following: Code: su nbadmin -c "ssh -t sever1 exec /bin/sh -s"<<EOF /etc/script/lister -C DAVID1 --s 12/01/2012 -e 12/03/2012 /volume EOF` This works just fine. But I want to run a script like this: Code: for server in server1; do     su nbadmin -c "ssh -t $server  \       'for DAVID1  in `cd /tmp/image; 'ls'`;       do             if '[ -d  /tmp/image/DAVID1&nbs (HowTos)