From: Peter Cooper Date: 2007-06-13T04:36:30+09:00 Subject: Re: Quick sed replacemnt On 6/12/07, yitzhakbg wrote: > Sorry, You didn't understand. The class name can be anything. Whatever > it is, I want the first changed to upper case. If you can show me how > to do it in Sed, that's fine. I found it messy and tried writing a > Ruby script. It also came out a little messy. Can you help me? perl -pi -e 's/^class ([a-z])/"class ".uc($1)/ge' filename.rb works.. there is a nicer way to do the upper casing in a Perl s// but I forget what, but this works ;-) Cheers, Peter Cooper http://www.rubyinside.com/