The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change of date format svenkatareddy Shell Programming and Scripting 2 05-23-2008 03:58 AM
Move A File With Same Date,don't Change The Desitination Dir Date jee.ku2 UNIX for Dummies Questions & Answers 1 01-09-2008 01:42 PM
Need to change filenames in a particular directory from lowercase to UPPERCASE Duke_Lukem UNIX for Dummies Questions & Answers 7 01-07-2008 06:32 PM
Change System Date Ricole AIX 1 07-26-2006 11:29 PM
Change new filename with date ?? sabercats Shell Programming and Scripting 9 02-13-2006 05:12 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-26-2008
tekster757 tekster757 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 33
Change date to uppercase

Hello,

I'm trying to take a 3 character date and change it to uppercase, does anyone know how to do that?

Currently, all commands that I know of for changing strings/variables to uppercase change the command itself to uppercase, not the output.

Here is what I've tried:

date="date +%b"
echo $date
Aug

echo $date | tr "a-z" "A-Z"
DATE +%B
echo "$date" | tr '[a-z]' '[A-Z]'
DATE +%B

OR:
DATE=`echo $date|awk '{print toupper($0)}'`
$DATE
ksh: DATE: not found

OR:
print $date|sed 'y/[a-z]/[A-Z]'
sed: Function y/[a-z]/[A-Z] cannot be parsed.

Does anyone know how to get that date to all CAPS? (as you see above, it currently reads "Aug"...)
 

Bookmarks

Tags
date to uppercase

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 On




All times are GMT -4. The time now is 09:34 PM.


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