Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: nested if else 'unexpected ";" ? please help.

  1. #11
    Join Date
    May 2012
    Beans
    8

    Re: nested if else 'unexpected ";" ? please help.

    Almost resolved.

    incremental command didn't belong in final condition. That's is the full back up.

    Still can't work out why or where I am supposed to be quoting around the elif. Anyone?

  2. #12
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    6,593
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: nested if else 'unexpected ";" ? please help.

    Could you post the new corrected version? I would be easier to take a look

    Regards.

  3. #13
    Join Date
    May 2012
    Beans
    8

    Re: nested if else 'unexpected ";" ? please help.

    Thanks for replying back.

    I worked it out... After a little bit of swearing and the sun coming up

    then lines were almost identical,

    elif [ -f /var/log/snar/${i}3.snar]
    elif [ -f /var/log/snar/${i}4.snar] etc

    the issue was the lack of a space next to the closing bracket.

    Pretty damn happy now. Not yet finished but got that part sorted out.

    Thanks again.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •