- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Coverting lower case to upper case in a script?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:17 AM
04-15-2002 03:17 AM
print -n 'what is your name: '
read NAME
awk -v NAME=$NAME '
{
toupper(NAME)
}'
echo $NAME
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:22 AM
04-15-2002 03:22 AM
Re: Coverting lower case to upper case in a script?
so what is your question ????
Regards
rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:23 AM
04-15-2002 03:23 AM
SolutionWhy not
[root]pbctst: echo "This is a Test"|tr "[a-z]" "[A-Z]"
THIS IS A TEST
[root]pbctst: BNAME="this is a Test"
[root]pbctst: echo $BNAME
this is a Test
[root]pbctst: BNAME=`echo $BNAME|tr "[a-z]" "[A-Z]"`
[root]pbctst: echo $BNAME
THIS IS A TEST
[root]pbctst:
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:25 AM
04-15-2002 03:25 AM
Re: Coverting lower case to upper case in a script?
So for your example:
print -n 'what is your name: '
read NAME
NAME=`echo $NAME|tr "[a-z]" "[A-Z]"`
will upcase your variable NAME
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:28 AM
04-15-2002 03:28 AM
Re: Coverting lower case to upper case in a script?
# UPPER=`echo "This Is In Mixed Case"|awk '{print toupper($0)}'`
# UPPER=`echo "This also"|tr -s '[:lower:]' '[:upper:]'`
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:30 AM
04-15-2002 03:30 AM
Re: Coverting lower case to upper case in a script?
What is your name? Wubbo Ockels
Your name is: WUBBO OCKELS
l1:/u/usr/merijn 109 >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2002 03:33 AM
04-15-2002 03:33 AM
Re: Coverting lower case to upper case in a script?
typset -u NAME
print -n 'name: '
read NAME
echo $NAME