Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash uppercase bad substitution

var=hello #For Bash Version higher than 4.3.33 try these
echo ${var''} #Uppercase whole string
HELLO
echo ${var'} #Uppercase only first char of string
Hello
var2=BYE
echo ${var2,} #Lowercase whole string
bye
echo ${var2,,} #Lowercase only first char of string
bYE
echo $var | tr 'a-z' 'A-Z' #For lower versions of Bash just use tr command
HELLO
Comment

PREVIOUS NEXT
Code Example
Shell :: How to Get VS Code Extensions as .ps1 for Installing to Another Computer 
Shell :: ubuntu terminal network monitor 
Shell :: how to put value of one variable into another in bash 
Shell :: conda install jupyter notebook 
Shell :: git diff between local and remote branch 
Shell :: How to install LAMP in Ubuntu 20.04? 
Shell :: how to make folder in ubuntu 
Shell :: install typescript in node project 
Shell :: how to cd into local machine using ubuntu subsystem 
Shell :: git log grep 
Shell :: install nvidia cuda toolkit ubuntu 20.04 
Shell :: Kali free ports 
Shell :: git revert merge 
Shell :: jupyter python downkload 
Shell :: install nano in docker 
Shell :: tweak tool ubuntu 
Shell :: while loop bash 
Shell :: 7zip command line 
Shell :: linux get user uid 
Shell :: grep nth line after match 
Shell :: set zsh as default linux 
Shell :: pip installation directory 
Shell :: use find command to search file contents 
Shell :: grant superuser permission to sudo user ubuntu 
Shell :: switch to remote branch git 
Shell :: linux ssh with password in one line 
Shell :: find file in linux with regex 
Shell :: kubectl create namespace 
Shell :: uid : unable to do port forwarding: socat not found 
Shell :: program to find leap year in bash 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =