Move under www to ease rsync
This commit is contained in:
12
www/eps/hpr2659/hpr2659_bash11_ex4.sh
Executable file
12
www/eps/hpr2659/hpr2659_bash11_ex4.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# String comparison with a pattern, using one of a list of patterns
|
||||
#
|
||||
for str in 'dog' 'pig' 'rat' 'cat' ''; do
|
||||
if [[ $str == @(pig|dog|cat) ]]; then
|
||||
echo "Matched '$str'"
|
||||
else
|
||||
echo "Didn't match '$str'"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user