sed and character classes , strange results
file "file" contains a aa aaa and sed -e 's/[[:lower]]/b/g' file gives :
b bb bbb all good. sed -e 's/[[:lower:]]/[[:upper:]]/g' file gives : [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] [[:upper:]] Character classes seems not recognized. I have tried with LC_LANG=C / us / no. Any ideas ? |
You could do it with 'tr'
Quote:
|
A sed command would be:
Quote:
L - for upper to lower cases |
Sed has also got a 'y' command that could do it, but the solution is quite weird:
Quote:
|
Quote:
which the replacement string isn't. See sycamorex post for "how to" ;} Cheers, Tink |
Also, hheck out this sed tutorial. Someone recommended it on this forum before. It's got a lot of useful information.
|
Quote:
Big thanks to all, checking out the howto:) |
Quote:
|
Quote:
Yves. |
Quote:
|
All times are GMT -5. The time now is 11:04 PM. |