EN
Bash - text to upper case
3
points
I this short article, we would like to show how to convert text to upper case in Bash.
Quick solution:
echo "Hi! My name is John." | tr '[:lower:]' '[:upper:]'
echo "Hi! My name is John." | awk '{print toupper($0)}'
echo "Hi! My name is John." | sed -e 's/\(.*\)/\U\1/'
Example output:
HI! MY NAME IS JOHN.