[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 518
  • Last Modified:

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
0
Anthony Lucia
Asked:
Anthony Lucia
2 Solutions
 
Dan CraciunIT ConsultantCommented:
cat script.name

Open in new window

HTH,
Dan
0
 
edster9999Commented:
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
 
TintinCommented:
Another way is to run the script without executing the commands, ie:

bash -nv script
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now