bash regular expression code example
Example 1: using regex in bash conditional statement
pat="[0-9a-zA-Z ]"
if [[ $x =~ $pat ]]; then ...
Example 2: bash expression
let a=1 #(outside for loop)
for i in {0..100..10} # example
do
let a=a+5
echo $a
done