Have command print to the screen during execution

In RHEL, how do you get commands contained within a script to print to the screen, instead of just the output of the commands
Anthony LuciaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
edster9999Connect With a Mentor Commented:
That will show the contents of the script at the start.
If you would like to show each line as it runs do

bash -x script-name

(the -x bit means show each command just before running it)
0
 
Dan CraciunConnect With a Mentor IT ConsultantCommented:
cat script.name

Open in new window

HTH,
Dan
0
 
TintinCommented:
Another way is to run the script without executing the commands, ie:

bash -nv script
0
All Courses

From novice to tech pro — start learning today.