Bash: Uppercase, Lowercase


2018-01-21 · 1 min read

In Bash 4, to lowercase:

var = 'Hello, World'
echo ${var,,}
hello, world

and to uppercase:

var = 'Hello, World'
echo ${var^^}
HELLO, WORLD

Subscribe to My Newsletter

The latest programming-related news, articles and resources - sent to your inbox monthly. Unsubscribe anytime.