Solved

Have command print to the screen during execution

Posted on 2014-04-06
3
496 Views
Last Modified: 2014-04-06
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
Comment
Question by:Anthony Lucia
3 Comments
 
LVL 34

Assisted Solution

by:Dan Craciun
Dan Craciun earned 250 total points
ID: 39981673
cat script.name

Open in new window

HTH,
Dan
0
 
LVL 20

Accepted Solution

by:
edster9999 earned 250 total points
ID: 39981678
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
 
LVL 48

Expert Comment

by:Tintin
ID: 39981924
Another way is to run the script without executing the commands, ie:

bash -nv script
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now