Warninng: This may be a specific machine issue or a problem with GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu) will update as I check further.
Update 1: Works with GNU bash, version 4.2.39. and GNU bash, version 4.2.24
I am working on bash script that asks questions. I was hoping to have a wild card if statement but checks if the user enters in no or just n but for some reason it just does not seem to work.
echo 'Is this a Personal Project? [y/n]'
read ORG_SWITCH
echo 'Do you want to Open Source this project? [y/n]'
read PRIVATE
and here is the if statement
if [[ $ORG_SWITCH == *"n"* ]] ; then
if [[ $PRIVATE == *"n"* ]] ; then
the errors it outputs are [[: not found [[: not found
and I am not sure why. I did see this but and tried a few of the solutions there but maybe I am just not understanding what is going on.
Any help would be appreciated and please feel free to talk down.