2011-12-20 3 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 (또는 bash, sh, csh 또는 tcsh#! 라인을 이해 같은 어떤 쉘)이 아닌 윈도우 명령 줄하지만. cygwin (ksh)을 설치해야 할 수도 있습니다. cygwin 터미널을 시작하고 거기에서 스크립트를 실행하십시오.

관련 문제