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

if fi bash shell script

Development
3
3
422
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
    heartk
    last edited by Jan 2, 2024, 7:26 AM

    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?

    N C 2 Replies Last reply Jan 2, 2024, 11:01 AM Reply Quote 0
    • N
      NogBadTheBad @heartk
      last edited by NogBadTheBad Jan 2, 2024, 11:05 AM Jan 2, 2024, 11:01 AM

      @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
      • J jimp moved this topic from General pfSense Questions on Jan 2, 2024, 3:57 PM
      • C
        crummyclank Banned @heartk
        last edited by Apr 2, 2024, 11:16 AM

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