Bash Basics Series #7 will teach you about the if-else statements in Bash.
https://itsfoss.com/bash-if-else/
Bash Basics Series #7: If Else Statement
If this, then that else something else. Doesn't make sense? It will after you learn about the if-else statements in bash shell scripting.Abhishek Prakash (It's FOSS)