Michelle Konzack wrote:
Am 2007-06-25 17:04:43, schrieb Bruno Costacurta:Hello,as I ckeck a script via 'sh -n <file>' I receive the syntax error
^^^^^^^^^^^^^
listserver.tcl: 31: Syntax error: "else" unexpected (expecting "then")
^^^
----8<------------------------------------------------------------------ proc scpAuth {sock} { global pass clientpass authenticated
<snipped code>
GiveList $sock } } then else { ^^^^^^^^^ GiveList $sock } } ----8<------------------------------------------------------------------ Try onla "else" at the "^^^^^^^" line Thanks, Greetings and nice Day Michelle Konzack
Bruno,There's a lot of guess work in my comments, here. ;) I did not see the original post, and so may have missed something important there, as well.
The code being discussed here is TCL, which I have little experience with, so I will defer to Michelle regarding the error marked.
However, the original post looks to be using standard shell script debugging methods (sh -n <file> as marked above).
But, the error message looks like a legitimate TCL error message.So, I guess you have a shell script that runs tclsh on a file called listserver.tcl?
If so, you need to be careful which environment you're actually doing the debugging in.
In fact, unless you have other errors in the shell script, it should not report any problems with the TCL part. The only way the shell would ever complain about TCL code is when a shell syntax error earlier in the script allows it to see into the TCL code part.
This may not make much sense, I could be clearer if I had the original file you used in the 'sh -n <file>' you mentioned, to examine.
-- Bob McGowan
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature