RE: How to convert file names from UPPERCASE to lowercase file names or vice versa using shell script?

How to convert file names from UPPERCASE to lowercase file names or vice versa using shell script?

chayan Senior Developer Asked on December 7, 2017 in LINUX.
Add Comment
1 Answers

 

#!/bin/bash
str="Hi this is Bikash"
# Convert to uppercase
echo "${str^^}"
# Convert to lowercase
echo "${str,,}"
 

 

Output:

HI THIS IS BIKASH
hi this is bikash

 

Team Leader Answered on December 27, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.