Uppercasing First Letter of Words Using SED
This line should do it:
sed -e "s/\b\(.\)/\u\1/g"
Using awk
:
awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1' file
The output would be:
Trouble Me
Gold Rush Brides
This line should do it:
sed -e "s/\b\(.\)/\u\1/g"
Using awk
:
awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1' file
The output would be:
Trouble Me
Gold Rush Brides