Solved

Have command print to the screen during execution

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

Suggested Solutions

Title # Comments Views Activity
issue in getting eth0 IP in oracale virtual box Linux VM 4 52
How to install Ubuntu 16 in DELL venue 8 pro 20 143
Choosing CentOS 16 79
awk file 6 51
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…
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

770 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