Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to display information of the script while its running?

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-08-2013
Rashid Khan Rashid Khan is offline
Registered User
Join Date: Mar 2013
Last Activity: 27 May 2013, 5:29 AM EDT
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
How to display information of the script while its running?

how to display the messages on screen IN PERL such as "

1. Entering while loop" if the script enters a while loop.

2. Checking FILENAME. etc...

3. Print statement is also not helpful....

Last edited by Rashid Khan; 03-08-2013 at 05:44 AM..
Sponsored Links
Old Unix and Linux 03-08-2013
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 17 February 2017, 3:53 PM EST
Location: Saskatchewan
Posts: 21,919
Thanks: 1,049
Thanked 4,094 Times in 3,793 Posts
You mean like debugging information, which prints lines as it runs code without needing print statements? Try the Perl Debugger perl -d scriptname

It's a bit more complicated than set -x since it's an interactive debugger, but not that complicated. The s command tells it to run the next line, and you can repeat that command by holding down enter. q quits.

See man perldebtut for more complete instructions.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Display problem when running a remote script chris01010 UNIX for Dummies Questions & Answers 4 05-17-2012 06:45 AM
Display full command (including options) information in running happy_lotus UNIX for Dummies Questions & Answers 3 04-18-2012 05:05 AM
Run a bash script, display on the screen and save all information in a file including error info Damon sine Shell Programming and Scripting 1 10-05-2010 05:02 PM
display time required to complete running script npatwardhan Shell Programming and Scripting 3 01-18-2009 08:01 PM

All times are GMT -4. The time now is 05:17 PM.