Question

I am trying to run a cmd file but I am receiving strange errors. I am running this:

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

But the results are returned with errors like so:

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.

I have tried this on two computers with the same results. Can any one tell me why this is happening?

Was it helpful?

Solution

This is a ksh script, launch it though ksh (or any shell like bash, sh, csh or tcsh which understand the #! line) and not the windows command line. You may need to install cygwin (with ksh), start a cygwin terminal and launch your script from there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top