bash regex

# sh bashre.sh 'aa(b{2,3}[xyz])cc' aabbxcc aabbcc
regex: aa(b{2,3}[xyz])cc

aabbxcc matches
capture[1]: bbx
aabbcc does not match

Um artigo bem legal sobre uso nativo de regex em bash, com um script de exemplo :)

Ref.:

Comente