Answers for "bash string to echo"

1

bash echo

# echo script vars
echo "outputString"
varToPrint=10
echo $varToPrint

# echo files
echo * # all
echo *.png # all pngs
echo specificFile.txt
Posted by: Guest on June-29-2021
1

bash echo in variable

#Just use following structure to store output of command into a variable:
var=$(command)
#For example:
var=$(echo 'hi')	#store hi into var
var=$(ls)	#store list of files into var
Posted by: Guest on December-08-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language