L E A R N I N G S
Tuesday, June 18, 2013
Bash command to convert string in variable to uppercase
Suppose you have a variable MY_VAR with value:
MY_VAR="this is my test"
To convert it to uppercase simply use the ^^. For e.g.,
echo ${MY_VAR^^}
This will output: THIS IS MY TEST
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment