myStr="Test"
myLowerCaseStr=${myStr,,}
myUpperCaseStr=${myStr^^}
echo "String: ${myStr}"
echo "Lower Case String: ${myLowerCaseStr}"
echo "Upper Case String: ${myUpperCaseStr}"
The output would be as follows:
String: Test
Lower Case String: test
Upper Case String: TEST
No comments:
Post a Comment