“Não pode executar arquivo binário” ao tentar executar um shell script no linux

Eu sou muito novo para linux e shell scriprting. Estou tentando executar um shellscript do shell seguro (ssh) no linux usando os seguintes comandos:

chmod +x path/to/mynewshell.sh

sh path/to/mynewshell.sh

Eu recebo este erro:

path/to/mynewshell.sh: path/to/mynewshell.sh: cannot execute binary file.

Tentei usar este comando:

bash path/to/mynewshell.sh

Eu recebo o mesmo erro.

Tentei com este comando:su - myusername sh path/to/mynewshell.sh Ele está pedindo minha senha e me dando este erro:no such file or directory.

1.O resultado do caminho cat -v / para / mynewshell.sh é: ^ @ ^ @ ^ @ ^ @ ^ @ ^ @ ^ @ ^ @ Rscript "$ dir" /diver_script.R

2.Quando tentei 'less path / to / mynewshell.sh', obtive isso no meu terminal:

#!/bin/bash/Rscript^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
for dir in /path/to/* ; do 
^@^@^@^@^@^@^@^@Rscript "$dir"/myRscript.R
done

3.Quando executei o caminho do arquivo / to / mynewshell.sh: recebi este "texto do script de shell Bourne-Again executável"

Por favor, dê algum conselho sobre como eu posso tentar executar o shellscript.

questionAnswers(3)

yourAnswerToTheQuestion