linux 火狐无法执行二进制文件_尝试在linux上运行shell脚本时“无法执行二进制文件”...

我是linux和shell脚本编程的新手.

我试图使用以下命令从Linux上的安全shell(ssh)运行一个shellcript:

chmod +x path/to/mynewshell.sh

sh path/to/mynewshell.sh

我收到此错误:

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

尝试使用此命令:

bash path/to/mynewshell.sh

我犯了同样的错误.

尝试使用此命令:su – myusername sh path / to / mynewshell.sh

它要求我的密码并给我这个错误:没有这样的文件或目录.

1. cat -v path / to / mynewshell.sh的结果是:

^ @ ^ @ ^ @ ^ @ ^ @ ^ @ ^ @ ^ @ Rscript“$dir”/diver_script.R

DONE

2.当我尝试’less path / to / mynewshell.sh’时,我在终端上得到了这个:

#!/bin/bash/Rscript^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@

^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@

for dir in /path/to/* ; do

^@^@^@^@^@^@^@^@Rscript "$dir"/myRscript.R

done

3.当我运行文件路径/到/ mynewshell.sh时:我得到了这个“Bourne-Again shell脚本文本可执行文件”

请提供有关如何尝试执行shellscript的任何建议.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值