String comparison in bash. [[: not found

后端 未结 7 1349
故里飘歌
故里飘歌 2020-11-29 17:40

I am trying to compare strings in bash. I already found an answer on how to do it on stackoverflow. In script I am trying, I am using the code submitted by Adam in the menti

相关标签:
7条回答
  • 2020-11-29 18:41

    [[ is a bash-builtin. Your /bin/bash doesn't seem to be an actual bash.

    From a comment:

    Add #!/bin/bash at the top of file

    0 讨论(0)
提交回复
热议问题