Syntax for OR condition in bash while loop

Viewed 2208

I tried many different combinations with brakets, quotation marks, ||, -o, but the only way the script works without infinit loop is without the OR in while loop comparison, like this: while [ $name != Jorge ]] ; do ... This is an example of an script that I want to run:

#!/bin/bash
echo "What is my name: "
read name

while [ $name != "Jorge" ] || [ $name != "Eduardo" ] ; do    
    echo "Not. Try again: "
    read name
done

echo "Well done!"
2 Answers
Related