2011-12-20 112 views
-1

我想运行cmd文件,但收到奇怪的错误。我正在此:未识别Windows脚本命令

#!/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. 

我已经试过这与相同的结果两台电脑。任何人都可以告诉我为什么会发生这种情况?

回答

1

这是一个ksh脚本,启动它虽然ksh(或像它理解#!线bashshcshtcsh任何shell),而不是Windows命令行。您可能需要安装cygwin(与ksh),启动一个cygwin终端并从那里启动您的脚本。