Files
Ilya Shpigor 81254606dd Minor fixes
2021-03-14 12:22:29 +01:00

15 lines
229 B
Bash

#!/bin/bash
array=(Alice Bob Eve Mallory)
for element in "${array[@]}"
do
if [[ "$element" == "$1" ]]
then
echo "The array contains the $1 element"
exit 0
fi
done
echo "The array does not contain the $1 element"