Languages
[Edit]
EN

Bash - text to upper case

3 points
Created by:
Root-ssh
92330

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.

See also

  1. Bash - text to lower case 
Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join