Jon
3
Q:

print variable in bash

echo "${var}"
0
#!/bin/bash  
echo  
echo "When single quote is used with string:"  
invitation='Welcome to javatpoint'  
echo $invitation  
echo  
echo "When double quote is used with string:"  
invitation="Welcome to javatpoint"  
echo $invitation  
echo  
echo "When variable is used with double quote:"  
Remark="Hello User!, $invitation"  
echo $Remark  
echo  
echo "When variable is used with single quote:"  
Remark='Hello User!, $invitation'  
echo $Remark  
echo  
0
#create a variable to store name
name="Lance Armah"
0

New to Communities?

Join the community