shell echo variable code example Example 1: linux shell echo command with varia ble echo “A is $var1 and B is $var2” Example 2: echo variable bash echo "${var}"