Ksh problem in script

Hi

I made a small script which uses ksh.

When i run the script then i get the following error

However when i run each of the commands on the commandline they get executed and provide the desired output. i cant figure out why the script is not running.

Kindly Help

Thanks in advance

I don't get that error when I try your script. Make sure that you are running it correctly. That error will happen if the old bourne shell was to try to run this script.

I'm sorry if it's obvious but you might have a bad invisible character in there, if the script has ever been near a Windows machine. Try running it through dos2unix to clean it up

Hi

I tried your suggestion S. but it didn't make any difference.
Perdarbo i am running my script in ksh. Like i said, if i run it line by line on the command line, it works perfectly well. However, even when i log in to ksh and run it from there, it still throws up the same error.
Its got me stumped. :confused:

Regards