Created
June 28, 2024 13:01
-
-
Save jeansymolanza/72498610cde2d6cac625628e48b92de9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine_or_job=$(echo "$machine_or_job" | tr '[:upper:]' '[:lower:]' | xargs) | |
if [[ ! "$machine_or_job" =~ ^(machine|job)$ ]]; then | |
echo "Variable does not represent a machine or job" | |
else | |
echo "Variable represents a machine or a job" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment