Welcome to the Linux Foundation Forum!

LFS203. Bash scripting. While loop lesson. testwhile.sh does not work with /bin/sh interpreter

Hello there,

In my ubuntu noble (24.04) below script does not work:

$ ./testwhile.sh 
./original_testwhile.sh: 3: [[: not found
you failed 4 times; giving up
./original_testwhile.sh: 14: exit: Illegal number: -1

With /bin/bash it works just fine.

Any thoughts on this?

Thanks in advance,

Luis

Comments

Categories

Upcoming Training