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?

Improve company productivity with a Business Account.Sign Up

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.