There is no simple ‘tolower’ command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars.
Create a shell script with the name ‘tolower’ that converts all text that is given as a command-line argument to lower case:
nano /usr/local/bin/tolower
and enter the following content:
#!/bin/sh echo $1 | tr '[:upper:]' '[:lower:]'
Then make the script executable:
chmod +x /usr/local/bin/tolower
An test it by executing this command on the shell:
tolower "Thats a Test"
will convert the string to lowercase and show the result on the shell:
thats a test
The post How to convert filenames or text to lowercase on the Linux command line appeared first on FAQforge.
The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…
Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…
Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…
Focal Fossa will reach the End of Standard Support in May 2025, also known as…
Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…
Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…