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!"
||by&&bash, you could use the regex operator alsowhile [[ ! $name =~ ^(Jorge|Eduardo)$ ]]; do