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

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!