From: Peter Cooper Date: 2007-06-13T04:38:49+09:00 Subject: Re: Quick sed replacemnt On 6/12/07, Peter Cooper wrote: > 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 I remembered the nicer way to do it :) perl -pi -e 's/^class ([a-z])/class \u\1/g' filename.rb Cheers, Peter Cooper http://www.rubyinside.com/