Taking a guess here - did you create the file on a windows machine? (or ftp in ascii mode?)

you probably need to run:
dos2unix dyndns.sh
chmod 755 dyndns

then try again