Languages
[Edit]
EN

Bash - text to upper case

3 points
Created by:
Root-ssh
98350

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 

Bash

Bash - text to upper 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