Skip to content

Commit

Permalink
explains contains function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Carvalho committed Sep 20, 2024
1 parent 33e79bd commit b810f7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ get_os_type() {
echo "$detected_os"
}

# contains checks if a word exists in a space separated list of words
contains() {
[[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]]
}
Expand Down

0 comments on commit b810f7e

Please sign in to comment.