Damian Gerow <[EMAIL PROTECTED]> writes: > I'm trying to write a shell script that runs a for loop in an SSH session. > Simply, I'm trying to do this: > > for HOST in `cat hostnames` ; do > ssh ${HOST} "for PROCESS in 01 02 ; do echo '${PROCESS}' ; done" > done > > But because this is run in a script, that gets translated to: > > for HOST in `cat hostnames` ; do > ssh ${HOST} "for PROCESS in 01 02 ; do echo '' ; done" > done
Here's a few clues (assuming you really want the single quotes in there): echo "THIS is SHELL: '\$SHELL'" echo "THIS is SHELL: '"'$SHELL'"'" echo 'THIS is SHELL: '\''$SHELL'\' which all give THIS is SHELL: '$SHELL' _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"