I am very new to linux and shell scriprting. I am trying to run a shellscript from secure shell (ssh) on linux using following commands:
chmod +x path/to/myn
That script is simply not a shell script. A shell script is usually readable and contains shell code. The output your cat command shows looks indeed like it's a binary of some sort. As some note, it might be because of a file conversion issue when copying but it looks more like an actual binary to me.
You can check what it is identified as with the file command so:
file path/to/mynewshell.sh
Just start with a clean script and rewrite the code, it looks like you just want to run some R scripts in a directory?
Make sure the R scripts point to the right R script executioner.