You need a space after the opening parenthesis. It's not clear why you were getting the error message in the first place but maybe just retyping a different command coincidentally fixes whatever was wrong (missing characters? Random invisible characters?)
First question:
Does the first line of the script look like this?
#!/bin/ksh
Next question:
does the output of this show any weird characters on the problem line
od -c myscript.sh
Finally - cut and paste (do not retype) the whole line that is a problem so we can read it. Include full command line above it and below it. Please give us the OS and shell -- ksh88 or ksh93.
I'm with Jim on this. The .ksh extension does not at all effect which shell will be invoked. If it's a sh with a different PATH than you run interactively, you could be getting another version of find than you get at the command line. Another thing to watch out for is DOS carriage returns in the script. You're not writing it on a Windoze machine and uploading it to your Unix account, are you?
Well why not tell what OS you are running?
Then type which ksh So we know what to put on the first line...
Then if it works fine on command line, I believe you have typos in your script...
I would recall the command line AND type v (call vi...) then save the command line with a name such as gogo.ksh, then chmod then ./gogo.ksh.
If this works, then you have just proven the problem lies in your script