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"...)