You can use variables with the echo command in Bash by first defining a variable and then referencing it. Here's a simple example:
# Define a variable
greeting="Hello LabEx"
# Use echo to print the variable
echo $greeting
In this example:
greetingis a variable that holds the string "Hello LabEx".- When you use
echo $greeting, it prints the value of the variable.
Make sure to use the $ sign before the variable name to reference its value. If you have any more questions or need further examples, let me know!
