Bash Command Substitution
Command substitution runs a command and puts its output in its place. Write the command inside $( ).
You can store the result in a variable, or use it straight inside a string in double quotes.
Store the output in a variable
upper=$(echo hello | tr a-z A-Z)
echo $upper
HELLO
Use it inside a string
In a folder with three files:
echo "There are $(ls | wc -l) files here"
There are 3 files here