[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shell : is syntax checking via option -n really working ?



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

    if {! $authenticated} {
        gets $sock passandport
        set serverpass [lindex [split $passandport] 1]
        if {$serverpass != $clientpass}
        {
            puts "Wrong authentication from ListClient (SecPanel)
Had to reject connection"
            close $sock
            return
        }
        else
        {
            set authenticated 1
            puts "SecPanel sent good authentication.
Now serving..."
            GiveList $sock
        }
    } then else {
      ^^^^^^^^^
        GiveList $sock
    }
}
----8<------------------------------------------------------------------


Try onla "else" at the "^^^^^^^" line

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: