perl -pe 's/([a-zA-Z])/sprintf("[%s%s]",uc($1),lc($1));/eg if /^\s*\S+\)/;'
I tried to be cute and do it in sed, but I realised perl was probably the quickest way of getting what I want due to s///'s e flag.
perl -pe 's/([a-zA-Z])/sprintf("[%s%s]",uc($1),lc($1));/eg if /^\s*\S+\)/;'
No comments:
Post a Comment