↑ ↓ select, Enter open, Esc close

Convert text to lowercase or uppercase

Adjust the values, the command updates live
user@server
tr '[:upper:]' '[:lower:]' < domains.txt

Replaces each uppercase letter with the corresponding lowercase letter and prints the result to the console. For the opposite direction, swap the two classes. Handy before sort -u, so that Example.com and example.com are recognized as the same.

Note: GNU tr works byte by byte and leaves non-ASCII letters such as Ä or Ö in UTF-8 unchanged. For text containing such characters, sed 's/.*/\L&/' is the more reliable option.

Also searched as

  • convert text to lowercase linux
  • tr uppercase to lowercase
  • normalize case of domain list

Related one-liners

All in Text processing

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.