【求助】shell

【求助】shell

if[$lenght -ne 5]
then
      echo "$name"
fi
done

syntax  error near unexpect token 'then'      
复制内容到剪贴板
代码:
if: [color=blue]if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi[/color]
    The if COMMANDS are executed.  If the exit status is zero, then the then
    COMMANDS are executed.  Otherwise, each of the elif COMMANDS are executed
    in turn, and if the exit status is zero, the corresponding then COMMANDS
    are executed and the if command completes.  Otherwise, the else COMMANDS
    are executed, if present.  The exit status is the exit status of the last
    command executed, or zero if no condition tested true.