Home > computers > linux > bash > bashchangecase| About
Home > Computers > programming > scripting > bash > bashchangecase | About

You can change the case of the whole string with ^^ (upper) like or ,, (minor), and the case of the first character with ^ or , like this :

root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL # s=pascal 
root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL # echo ${s^^}                                                                                                                                                                           
PASCAL                                                                                                                                                                                                                                       
root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL # echo ${s^}                                                                                                                                                                                    
Pascal                                                                                                                                                                                                                                       
root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL #  

contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code bashchangecase (generated for current page)