Ssh from a ksh returning not found message

Script name is test.ksh
I know that that the ssh command is working properly, this can be verified by the value returned in respond variable. It is unique to the remote server
_____________________________________________________

respond=$(ssh $remoteHost find /xxx/xxxxxxxx/xxx/xxxxx/xxxx/xxx/xxx -type f -mtime -7)
if [[ -z $respond ]]
then
   echo "NOT updated $respond"
else
   echo "UPDATED $respond"
fi

______________________________________________________________
right before this command I echo out several statements including the $remoteHost value
start script --echo from script
Connecting to xxx@xxxxxxxx -echo from script
./test.ksh[26]: --: not found.
What I don't understand is the generated line above, is it looking for my script on the remote server, if so why? Is there something I should be doing so it does not?
Thanks for any help

What is line 26?

respond=$(ssh $remoteHost 'find /xxx/xxxxxxxx/xxx/xxxxx/xxxx/xxx/xxx -type f -mtime -7')

Thanks guys, being a unix developer sometimes is showing its spots. I had a comment line with sql comment -- in front of it instead of unix #. I guess I didn't realize it was calling out a line number. Learn something new every day.
I appreciate you calling out the obvious.

1 Like