2011-12-20 24 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. 

私は同じ結果を持つ2台のコンピュータ上でこれを試してみました。なぜこれが起こっているのか誰にでも教えられますか?

答えて

1

これはkshスクリプトで、ksh(または#!ラインを理解bashshcshまたはtcshのような任意のシェル)かかわらず、Windowsのコマンドラインを起動します。 cygwinksh)をインストールする必要があります。cygwinターミナルを起動し、そこからスクリプトを起動します。

関連する問題