Learning machine learning? Try my machine learning flashcards or Machine Learning with Python Cookbook.
If Else For Strings
While you can often use [[ ]]
for integers, (( ))
is specifically designed to work with integers and provides a lot more functionality.
Create Variable
name="Ralph Holmes"
Create If Else Statement
if [[ "$name" == "Ralph Holmes" ]]; then
echo "It is Ralph."
else
echo "It is not Ralph"
fi
It is Ralph.