In Bash, you can use parameter expansion to modify a string to all lower-/upper-case:
var1=TesT
var2=tEst
echo ${var1,,} ${var2,,}
echo ${var1^^} ${var2^^}
More Related Contents:
- How to check if a string contains a substring in Bash
- Getting “command not found” error while comparing two strings in Bash
- How do I use variables in single quoted strings?
- Extract substring in Bash
- Multi-line string with extra space (preserved indentation)
- Replace whole line containing a string using Sed
- How can I compare a string to multiple correct values in Bash?
- Compare version strings in groovy
- Shell script – remove first and last quote (“) from a variable
- How to echo “$x_$y” in Bash script?
- Convert specified column in a multi-line string into single comma-separated line
- Test for empty string with X”” [duplicate]
- Split bash string by newline characters
- How to compare strings in Bash
- Convert Int to String in Swift
- What are the differences between Rust’s `String` and `str`?
- How do I remove the file suffix and path portion from a path string in Bash?
- How to split one string into multiple strings separated by at least one space in bash shell?
- Count word occurrences in R
- converting datetime string to POSIXct date/time format in R
- Python: most idiomatic way to convert None to empty string?
- Integer PadLeft function in T-SQL
- When using the MOV mnemonic to load/copy a string to a memory register in MASM, are the characters stored in reverse order?
- Convert time.Time to string
- How to join multiple lines of filenames into one with custom delimiter
- How to compare strings
- Excel VBA like operator [closed]
- Swift – Split string over multiple lines
- Groovy String to Date
- What is the difference between VBScript’s + and & operator?