How to stop debug in the mid of process?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to stop debug in the mid of process?
# 8  
Old 11-07-2013
ken6503

An excellent hint to step through scripts. I shall deploy it in scripts something like this:-
Code:
#!/bin/ksh
# Comments....
#

if [ ! -z "$DEBUGSTEP" ]
then
   set -x
   trap "read" DEBUG
fi
echo 1
echo 2
echo 3

In normal use, DEBUGSTEP will be null and therefore no action is taken, but when required I can step through a script and debug without updating the production script or any calling script.


Marvellous!


Thanks again,
Robin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Question: HowTo Exit Script with User Input While Process is Running Mid-Loop?

Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies

2. Shell Programming and Scripting

How to stop the process in shell scripting?

Hi all, I have tried the below code to execute. #! /bin/bash date1=`date -d "today 08:00:00" +%s` date2=`date -d "today 08:01:00" +%s` path=/home/user01/red/IDC/sample cd $path java Cspsamp 111.19.5.172 7025 rd1 rd1 "5022=Query|5026=109378|4=627|5=E:VD|5042=$date1|5049=$date2"... (5 Replies)
Discussion started by: aish11
5 Replies

3. UNIX for Dummies Questions & Answers

Stop the process

I have the following log file running since yesterday and its consuming so much of the disk space. -rw-rw-r-- 1 dev dba 4543237120 Nov 10 09:00 load_run_file1_0.1111091224.lg How do i kill this process. I don't have any idea of stopping this. Any help would be really appreciated. ... (3 Replies)
Discussion started by: bobby1015
3 Replies

4. Shell Programming and Scripting

Process running? Stop it

I have this "process keepalive" script: #!/bin/bash PIDFILE=/tmp/php.pid PHPSCRIPT=/home/www/mydomain.com/subdomains/www/parser.php echo 'Checking php process from PID file' if ; then PID=`cat $PIDFILE` if ps ax | grep -v grep | grep $PID > /dev/null then echo "php process still... (4 Replies)
Discussion started by: LukasB
4 Replies

5. Shell Programming and Scripting

how to stop the process that is running continously

Hi there, I have written a script to check daily process, each script is in a different directory. Now the first process is running fine, when it goes to the next directory the process doesn't executes. cd result/logs ref=month_1888.log echo $ref>> $logfile cd /max/tot/first... (3 Replies)
Discussion started by: NehaKrish
3 Replies

6. Programming

Debug two process Using GDB

Hi All I know How to attach a process to beubg it .But for my application I am using client as well server.Both are two separate process .Suppose I need to debug both .How to attach both of them together .Or I have to attach them separetly . Suppose client process id is 1325 and server is... (2 Replies)
Discussion started by: mr_deb
2 Replies

7. AIX

a process that never stop

Dears all i have an AIX box in which i am facing a problem with a process as below: /usr/dt/bin/dtexec -open 0 -ttprocid and each time i am killing this process with "kill -9" then it run again after a while. any ideas or solutions will be appreciated. (13 Replies)
Discussion started by: TheEngineer
13 Replies

8. Shell Programming and Scripting

Stop / kill the process individually

Hi , I have a situation, where I have 10 indivudal processess started by similar instance.I say similar instance because each of them being started as a new thread: Say I've following unix process running process1_ADAP process2_ADAP process3_ADAP Current scenario: Now I have SHUTDOWN... (5 Replies)
Discussion started by: braindrain
5 Replies
Login or Register to Ask a Question
LIFEREA(1)						      General Commands Manual							LIFEREA(1)

NAME
Liferea - RSS/RDF and Atom news aggregator SYNOPSIS
liferea [OPTIONS] DESCRIPTION
Liferea (Linux Feed Reader) is an RSS/RDF and Atom news aggregator which also supports CDF channels, OCS, and OPML directories. It's intended to be a clone of the Windows-only FeedReader. It can be used to maintain a list of subscribed feeds, browse and search through their items and displays their contents. OPTIONS
Liferea options: --version output version information and exit --help display a option overview and exit --mainwindow-state=STATE Start Liferea with its mainwindow in STATE: shown, iconified, hidden --debug-all Print debugging messages of all types --debug-cache Print debugging messages for the cache handling --debug-conf Print debugging messages of the configuration handling --debug-gui Print debugging messages of all GUI functions --debug-html Enables HTML rendering debugging. Each time Liferea renders HTML output it will also dump the generated HTML into ~/.lif- erea_1.6/output.xhtml. --debug-parsing Print debugging messages of all parsing functions --debug-performance Print debugging messages when a function takes too long to process --debug-plugins Print debugging messages for the plugin loading --debug-trace Print debugging messages when entering/leaving functions --debug-update Print debugging messages of the feed update processing --debug-verbose Print verbose debugging messages DBUS INTERFACE
To allow integration with other programs Liferea profives a DBUS interface for automatic creation of new subscriptions. The script liferea- add-feed is a convenient way to use this interface. Just pass a valid feed URL as parameter and the feed will be added to the feed list. You can also pass non-feed URLs to use feed auto discovery. Example: liferea-add-feed "http://www.newsforge.com/newsforge.rss" Please note that Liferea needs to be running for liferea-add-feed to work. ENVIRONMENT
http_proxy If a proxy is not specified in the Liferea preferences (which uses the proxy settings in gconf), then Liferea will use the proxy specified in $http_proxy. $http_proxy should be set to a URI specifying the desired proxy, for example 'http://proxy.exam- ple.com:3128/'. FILES
/usr/lib/liferea/ Contains Liferea plugins /usr/share/liferea/css/ Contains stylesheets for feed display /usr/share/liferea/opml/ Contains default feedlists ~/.liferea_1.6/ Contains user feedlist and feed cache AUTHOR
This manual page was written by Lars Lindner <lars.lindner@gmail.com>. May 12, 2009 LIFEREA(1)