I am trying to create a while loop in bash that won't continue until the user enters the word "next". I can't seem to figure out how to use strings for the condition though.
#Beginning of code
echo -e "Please type next to continue."
read word
while [ "$word" -ne "next" ]
do
read word
done
#the rest of the code
while [ "$word" = "next" ]
The -eq is used for numeric comparision – Romeo Ninov 20 hours ago