Move under www to ease rsync
This commit is contained in:
14
www/eps/hpr2669/hpr2669_bash12_ex3.sh
Executable file
14
www/eps/hpr2669/hpr2669_bash12_ex3.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Demonstrate a more complex regular expression to detect matching words in
|
||||
# a file (one per line)
|
||||
#
|
||||
|
||||
re='\<.{4,}[tl]ing\>'
|
||||
|
||||
while read -r line; do
|
||||
if [[ $line =~ $re ]]; then
|
||||
echo "$line"
|
||||
fi
|
||||
done < <(shuf -n 100 /usr/share/dict/words)
|
||||
Reference in New Issue
Block a user