# Created on savesnippets.com · https://savesnippets.com/9fjFZGddrqgqc9 s="Hello World" echo "${s^^}" # HELLO WORLD — uppercase all echo "${s,,}" # hello world — lowercase all echo "${s^}" # Hello World — uppercase first char echo "${s,}" # hello World — lowercase first char # Title-case each word using awk (no built-in for this) title() { echo "$*" | awk '{for (i=1; i<=NF; i++) $i = toupper(substr($i,1,1)) tolower(substr($i,2))} 1'; } title "the lord of the rings" # The Lord Of The Rings