Using linux script command
set -o verbose
Execute this on terminal before executing your script or add this at the beginning of the script.
This will change the terminal configuration to echo all the commands before executing them.
This will add the command then followed by the output of that command.
you can also use :
set -x or set -v set -xv
-x option enables variable expansion and echo's all the option used with the command.
-v is similar to -o verbose this simply echo's the command name
-xv echo's both.