If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > tr command to reverse lower/upper case.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-07, 18:44
rfourn rfourn is offline
Registered User
 
Join Date: Jun 2007
Posts: 11
tr command to reverse lower/upper case.

im trying to find a tr command to
change all upper case to lower case and
all lower case to upper case.
for example:
file is 'RED sox'
need it changed to 'red SOX'

tried tr 'a-zA-Z' 'A-Za-z'

what an i missing??

thanx for the help
Reply With Quote
  #2 (permalink)  
Old 06-07-07, 21:15
ISPserver ISPserver is offline
Registered User
 
Join Date: Jun 2007
Posts: 9
I try tr a-z A-Z

Code:
$echo "dLKJFDKLJKLjfhksajdhk" | tr a-z A-Z
DLKJFDKLJKLJFHKSAJDHK
Work fine.
Reply With Quote
  #3 (permalink)  
Old 06-07-07, 21:19
rfourn rfourn is offline
Registered User
 
Join Date: Jun 2007
Posts: 11
no good... i need the lowercase to be upper case
AND the uppercase to be lowercase..
Reply With Quote
  #4 (permalink)  
Old 06-08-07, 18:52
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,454
It probably depends on the version of tr. GNU tr works just fine
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On