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.
In this article, we will see how to install nvidia-smi on Ubuntu or Debian Linux.…
In this article, we will see how to install clang tool on Ubuntu or Debian…
When working with Docker containers on Raspberry Pi devices, you might encounter frustrating signature verification…
You’ve recently upgraded to Ubuntu 18.04 and found that your OpenVPN connection no longer resolves…
Have you ever tried to open System Monitor on your Ubuntu 18.04 system only to…
System hardening means locking down a system and reducing its attack surface: removing unnecessary software…