From: yitzhakbg Date: 2007-06-13T04:26:19+09:00 Subject: Re: Quick sed replacemnt 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? On Jun 12, 10:20 pm, Reid Thompson wrote: > On Wed, 2007-06-13 at 04:14 +0900, yitzhakbg wrote: > > I need a quicky which I can't do in sed and I did it very clumsily. > > I need to filter the following file, changing the class name's first > > letter to upper case. > > For example, rewrite the file with the word "organizationsController" > > changed to "OrganizationsController". > > Thanks. > > > Here's a sample file: > > > # > > # A skeletal controller > > # > > class organizationsController < ApplicationController > > active_scaffold :organization > > # layout "activescaffold" > > end > > sed 's/organizationsController/OrganizationsController/' file > newfile