The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
grep unix.com with google



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-30-2009
Registered User
 

Join Date: May 2009
Posts: 65
lower case to upper case

Hi i want to change lower case letters from lower case to upper case for only one particular column.

so my file looks like this


Code:
YU09m  ERTR
YU88j    UIOE

I want to change it so the letters all on column 1 are upper case


Code:
YU09M  ERTR
YU88J   UIOE

thanks
  #2 (permalink)  
Old 11-30-2009
Registered User
 

Join Date: Nov 2008
Location: Amsterdam
Posts: 1,258
Try:

Code:
sed 's/[^ \t]*/\U&/' infile

  #3 (permalink)  
Old 11-30-2009
scottn scottn is online now Forum Staff  
Moderator
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,609
If your sed doens't do that (as mine doesn't)...


Code:
awk '{$1 = toupper($1)}1' infile

  #4 (permalink)  
Old 11-30-2009
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 6,006
or tr:

Code:
tr -s '[:lower:]'  '[:upper:]'  < oldfile > newfile

Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to Convert Upper case to Lower case grahambo2005 Shell Programming and Scripting 7 07-12-2009 10:15 AM
Lower Case > Upper Case ora_umair UNIX for Dummies Questions & Answers 3 06-30-2009 12:49 PM
convert upper case to lower case in ascript vz6zz8 Shell Programming and Scripting 2 06-04-2009 01:50 AM
how to convert value in a variable from upper case to lower case manmeet Shell Programming and Scripting 2 11-13-2008 02:22 PM
lower case to upper case string conversion in shell script dchalavadi UNIX for Dummies Questions & Answers 3 05-29-2002 01:07 AM



All times are GMT -4. The time now is 09:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0