lowercase to uppercase with sed

I know you're not supposed to ask homework questions, but this is driving me crazy.  I have a file named cars.txt which contains make|model|year|milage|price.  The question is to list all lines, but capitalize the first letter of the make using only one sed command. (ford would be Ford).  This is what I have so far:  sed 's/^[a-z]/What Goes here??/' cars.txt
I can't figure out what I should put as the replacement string.  I have tried everything I can think of which leads me to believe that my mind has gone to mush and it is something really easy.  Please help!
sdickensAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tel2Commented:
I can't figure it out either sdickens.

I know this is not a very elegant answer, but does this count as one sed command?
  sed "s/a/A/g;s/b/B/g;s/c/C/g;
  ...etc...
  ;s/z/Z/g" cars.txt

It would have been easy in tr:
  tr "[a-z]" "[A-Z]" <cats.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahoffmannCommented:
tel2, both your examples replace *all* lower case letters.
sdickens, you need to use awk or perl. Using sed and tr can be done in a single line, but not a single command.
0
ahoffmannCommented:
opps, probably possible with sed, see b, t and y commands
0
tel2Commented:
GOOD POINT ahoffmann!
I must learn to read some day!

I guess I have to ammend my answer to:

sed "s/^a/A/;s/^b/B/;...etc...;s/^z/Z/"

If you can call that ONE command.

Please let us know when you find the REAL answer sdickens!
0
MoondancerCommented:
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  Or if you are an EE Pro user, click the link below to select open items for your Member ID using Power Search:
http://www.experts-exchange.com/jsp/qPowerSearch.jsp.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.