In this example, we take a look at how to convert an uppercase string to lowercase using a bash script.
Example:#!/bin/bash
upper_case_str="CODE2CARE - LINE OF CODE FOR CHANGE"
lowercase_str=$(echo "$upper_case_str" | tr '[:upper:]' '[:lower:]')
echo "Uppercase String: $upper_case_str"
echo "Lowercase String: $lowercase_str"
Output:
Uppercase String: CODE2CARE - LINE OF CODE FOR CHANGE
Lowercase String: code2care - line of code for change

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Bash,
- Bash Hello World! Script Tutorial
- How to run bash command in background
- How to create new user account in Windows bash
- How to Compare Strings in Bash
- Bash: Allow Command to Fail without exiting Script
- Fix bash: script.sh: Permission denied Error
- Bash getopts Command Example
- How to fix bash ping command not found error
- How to add NewLine Character in Bash Script String
- How to Echo Bash Command to a File
- Bash Command to Find String in a File
- How to open new Terminal using Bash Command
- Bash How to Save Output of a Command to a Variable
- Download a SSL Certificate from a URL in Terminal
- Bash Command to Check IP Address
- Know Bash shell version command
- Bash Command To Check If File Exists
- How to run a Command in Bash Script
- How to Compare two Files in Bash Shell
- How to check if a variable is set in Bash Script or Not
- Convert String from uppercase to lowercase in Bash
- How to see Created Accessed Modified and Changed dates of a file using bash terminal command
- Bash Command To Get Current Time
- Bash command to List Files
- Fix: bash: syntax error near unexpected token
More Posts:
- Fix MySQL - Error: (OperationalError) (HY000) [08S01] Communications link failure - MySQL
- How to Download and Install Android adb Tool on Linux, Mac or Windows - Android
- Github: fatal: Authentication failed Support for password was removed on August 13, 2021 - Git
- Force android app to run in Landscape mode programatically - Android
- How to fix Java HTTP java.net.UnknownHostException - Java
- Python: If Else Statements in One Single Line - Python
- Integrating Android Facebook SDK 3.17.2 Tutorial - Android
- Minecraft Fix: Error: UNKNOWN code: Deep Ocean - Something went wrong in the login process - Windows