Languages
[Edit]
EN

Bash - text to lower case

9 points
Created by:
Root-ssh
170660

I  this short article, we would like to show how to convert text to lower case in Bash.

Quick solution:

echo "Some text here ..." | tr '[:upper:]' '[:lower:]'

 

Practical example

echo "Hi! My name is John." | tr '[:upper:]' '[:lower:]'

Example output:

hi! my name is john.

 

Alternative solutions

echo "Hi! My name is John." | awk '{print tolower($0)}'
echo "Hi! My name is John." | sed -e 's/\(.*\)/\L\1/'

Example output:

hi! my name is john.

 

See also

  1. Bash - text to upper case 

Alternative titles

  1. Bash - text to lowercase
  2. Bash - text to lower-case
  3. Bash - lower case all letters in string
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

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