I'm trying to write a script which will read two choices, and if both of them are "y" I want it to say "Test Done!" and if one or both of them isn't "y" I want it to say "Test Failed!"
Here's what I came up with:
echo "- Do You want to make a choice?"
read choice
echo "- Do You want to make a choice1?"
read choice1
if [ "$choice" != 'y' ] && [ "$choice1" != 'y' ]; then
echo "Test Done!"
else
echo "Test Failed!"
fi
But when I answer both questions with "y" it's saying "Test Failed!" instead of "Test Done!". And when I answer both questions with "n" it's saying "Test Done!"
What have I done wrong?