#!/bin/bash # regex-play # # it looks to see if lines in its command-line arguments # match a particular BRE # # by: Sharon Tuttle # last modified: 2022-10-17 # for each command-line argument string, # print whether it matches the BRE aa* for i in "$@" do if [[ "$i" =~ aa* ]] then echo "matched: [$i]" else echo "NO match: [$i]" fi done