Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    if fi bash shell script

    Scheduled Pinned Locked Moved Development
    3 Posts 3 Posters 543 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      heartk
      last edited by

      A=1
      if [ $A == 1 ] ; then
      echo $1
      else
      echo ??
      fi

      Syntax error: end of file unexpected (expecting "fi")

      What is the reason for the continuity error?

      NogBadTheBadN C 2 Replies Last reply Reply Quote 0
      • NogBadTheBadN Offline
        NogBadTheBad @heartk
        last edited by NogBadTheBad

        @heartk What shell are you running ?

        If its /bin/csh if ends with an endif

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • jimpJ jimp moved this topic from General pfSense Questions on
        • C Offline
          crummyclank @heartk
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.