Is it possible to echo out what command is being run in a shell script?
(Without put the -X in the sheabang to turn on the debuggin mode. This is not part of a debugging process)
thanks
[Edit: more details]
Suppose I have a script like this:
#! /bin/sh
clear
cd ~/home/
How do I have the two commands that are executed (cd and clear) printed to the console?
On my version of
/bin/sh(the Debian Almquist Shell, dash), there’s no other way than-xto get this behavior. Echoing commands is also the only effect of-x, so I see no reason not to use it.