How to convert all text from upper case to lower case on Linux?

How to Convert Text to Lowercase in Linux

There are several quick ways to change case in the Linux terminal.

The Commands

  • tr: echo "HELLO" | tr '[:upper:]' '[:lower:]'
  • awk: echo "HELLO" | awk '{print tolower($0)}'
  • Bash: str="HELLO"; echo "${str,,}"

Linux Text Processing in 2026

In 2026, the Bash built-in ${str,,} is the most efficient for variables as it doesn’t spawn a new process. For file processing, sed and awk remain the workhorses. For more complex Unicode-aware case conversion, Python or Perl one-liners are often preferred to ensure correct handling of non-ASCII characters.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *