Replacing capitals with normal letters using SED


Needed to change CAPITAL variable names to normal in a long SQL-syntax file. Sourceforge had a way to do it with SED.

GSED 4.+ supports the \L& and \U& switches to transform everything to lowercase or uppercase respectively:

sed 's/MyRegExp/\L&/g'

changes the regular expression MyRegExp into lowercase.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s