[lL][iI][bB][nN][aA][mM][eE]

by using this sed expr

s/[aA]/[aA]/g;s/[bB]/[bB]/g;<22 more>;s/[yY]/[yY]/g;s/[zZ]/[zZ]/g;

Isn't there a better way? (I can't think of one offhand, given how this is used to generate a list of "potential_libs", but still...this can't be very efficient.)

I would do something like this:

s/[A-Za-z]/*|&|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ*/g
s/\*|\(.\)|[A-Za-z]*\1[A-Za-z]\{25\}\([A-Za-z]\)[A-Za-z]*\*/[\1\2]/g

or, for GNU sed 4.x only,

s/[A-Za-z]/[\l&\u&]/g

Paolo


Reply via email to