-1

我正在尝试运行 cmd 文件,但收到奇怪的错误。我正在运行这个:

#!/bin/ksh
#@echo off
#REM *************************************************************************
...
...

但结果返回错误,如下所示:

C:>#!/bin/ksh
'#!' is not recognized as an internal or external command,
operable program or batch file.

C:>#@echo off
'#@echo' is not recognized as an internal or external command,
operable program or batch file.

C:>#REM *************************************************************************
'#REM' is not recognized as an internal or external command, 
operable program or batch file.

我已经在两台计算机上尝试过,结果相同。谁能告诉我为什么会这样?

4

1 回答 1

1

这是一个ksh脚本,但启动它ksh(或任何 shell,如,bash或理解该行)而不是 windows 命令行。您可能需要安装(使用),启动 cygwin 终端并从那里启动您的脚本。shcshtcsh#!cygwinksh

于 2011-12-20T19:01:42.430 回答