String comparison in bash. [[: not found

后端 未结 7 1392
故里飘歌
故里飘歌 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:23

    Specify bash instead of sh when running the script. I personally noticed they are different under ubuntu 12.10:

    bash script.sh arg0 ... argn

提交回复
热议问题