My script is executing the following line:
ssh $REMOTE_USER@${SUPPORTED_SERVERS[$i]} "gtar -zcvf $TAR_FILE `find $LOCAL_PATH -name *$DATE*`
Now, the problem is that find
command is being executed on the local machine and I need it to be executed on the remote one.
Please help, Thanks
Use
$()
rather than backtick ` and additionaly escape it with backslash to avoid executing the command on the local machine: