Solved

Have command print to the screen during execution

Posted on 2014-04-06
3
497 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

920 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

15 Experts available now in Live!

Get 1:1 Help Now