为什么SunOS说它无法执行这个KornShell脚本?

Rhy*_*yuk 1 linux shell scripting ksh solaris

我在服务器A中有一个KornShell(ksh)脚本,它将在ServerB中运行一个脚本.

    #!/bin/ksh/
    ssh user@server "/path/script.sh"
Run Code Online (Sandbox Code Playgroud)

脚本权限如下:

 -rwxrwxrwx   1 user    dba           75 Jun 11 10:00 script.sh
Run Code Online (Sandbox Code Playgroud)

我检查了/ bin中是否存在'ksh'.(bash不是)

当我尝试运行脚本时,我得到了 ./script.sh: cannot execute

可能会发生什么?我手动测试了ssh命令,它可以工作.

它是一个SunOS系统.

Lev*_*von 6

删除尾随/#!/bin/ksh/..离开它有导致错误对我来说太.

这是我在Linux下使用尾部斜杠得到的消息(比出现的SunOS更具描述性):

ksh: ./so2.sh: cannot execute [Not a directory]
Run Code Online (Sandbox Code Playgroud)