Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unix equivalent of '@ECHO ON'

Tags:

shell

unix

Need to confirm if there is a UNIX equivalent command for '@ECHO ON' in DOS.

I am required to echo each command and then its O/P. I can do it by adding an echo statement for each command that I execute from my script. But I don't want to do it with a echo statement for each command in my script. Curious to know if there is a command that does the same functionality as '@ECHO ON' in DOS.

like image 842
Kannan Ramamoorthy Avatar asked Jan 11 '23 16:01

Kannan Ramamoorthy


1 Answers

To turn on tracing

set -x

To turn off tracing

set +x
like image 83
Oli Avatar answered Jan 28 '23 14:01

Oli