Reputation: 43
this command does not work in sed, version 4.2.1.
sed 's/[[:upper:]]/[[:lower:]]/' <file.
although it does detect the upper case pattern, it does not do the conversion to lower case, rather it converts the captured patterns to [[:lower:]]. any workaround?
Upvotes: 1
Views: 66
Reputation: 23364
With sed, you need to capture the upper-case pattern in a group and then substitute with the lowercase version
sed -r 's/([[:upper:]])/\L\1/g' <file
Upvotes: 0