Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

line 407: syntax error near unexpected token

Help
alternapop
2009-07-07
2013-05-29
  • alternapop
    alternapop
    2009-07-07

    I've downloaded this on an xserve running 10.5.7 and changed a couple of variables.  (username, password, db=all)

    At first i got an error for lines 365 and 371 had to remove the ending semicolons (  if [ "$COMMCOMP" = "yes" ];  )

    now i'm getting this error for line 407:

    -------------
    bash-3.2# ./automysqlbackup.sh
    ./automysqlbackup.sh: line 407: syntax error near unexpected token `6'
    ./automysqlbackup.sh: line 407: `exec 6>&1'
    ./automysqlbackup.sh: line 409: $LOGFILE: ambiguous redirect
    usage: touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
    ./automysqlbackup.sh: line 413: $LOGERR: ambiguous redirect
    -------------

    my first thought is, why am i getting these errors when others appear to not get them?  secondly, how can i resolve the line 407 problem?  i don't see what is causing the error.

    thanks

     
    • alternapop
      alternapop
      2009-07-07

      i've found the answer.  the password for my backup user.

      it contained these characters:

      (!

      so either the left parenthesis or the exclamation point was causing the error