Menu

#2972 Freeplane (freeplane_bin-1.9.5.zip) fails to run in linux debian via (freeplane.sh)

Next Release
not-a-bug
nobody
None
normal
minor
HaveNotTried
none
Linux Debian (64bit)
1.9.5 stable
2021-07-03
2021-07-02
Milavon
No

I usually run the freeplane (bin) files on linux debian (64bit) by extracting them and then running the script file (freeplane.sh) in the command line, without any problem, for example:

$ sh "/home/user/Downloads/freeplane-1.9.5/freeplane.sh"

but recently (starting from (1.9.5) or earlier (I'm not sure)), when I run the same command:
It fails to run and I get an error message:

$ sh "/home/user/Downloads/freeplane-1.9.5/freeplane.sh"
/home/user/Downloads/freeplane-1.9.5/freeplane.sh: 60: Syntax error: "&" unexpected

after this error, I checked the script file (freeplane.sh) and found the line of concern:

JAVA_VERSION=$(${JAVACMD} -version |& grep -E "[[:alnum:]]+ version" | awk '{print $3}' | tr -d '"')

  • it looks like that the character "&" in this line is what cause this error, but I was hesitant to remove it because I don't know if it is essential part of the script

Thanks

Discussion

  • Felix Natter

    Felix Natter - 2021-07-02

    hello Milavon,

    you have to run the script via bash ... or ./freeplane.sh. The script requires a bash
    and /bin/sh is not a bash.

    Best Regards,
    Felix

     
    • Milavon

      Milavon - 2021-07-02

      yes, it worked
      I realized that (sh) on the current system was not bash
      Thanks

       
  • Dimitry Polivaev

    • status: new --> not-a-bug