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
tapset::scsi(3stap)													       tapset::scsi(3stap)

NAME
tapset::scsi - systemtap scsi tapset DESCRIPTION
This family of probe points is used to probe SCSI activities. scsi.ioentry Prepares a SCSI mid-layer request See probe::scsi.ioentry(3stap) for details. scsi.iodispatching SCSI mid-layer dispatched low-level SCSI command See probe::scsi.iodispatching(3stap) for details. scsi.iodone SCSI command completed by low level driver and enqueued into the done queue. See probe::scsi.iodone(3stap) for details. scsi.iocompleted SCSI mid-layer running the completion processing for block device I/O requests See probe::scsi.iocompleted(3stap) for details. scsi.ioexecute Create mid-layer SCSI request and wait for the result See probe::scsi.ioexecute(3stap) for details. scsi.set_state Order SCSI device state change See probe::scsi.set_state(3stap) for details. SEE ALSO
probe::scsi.ioentry(3stap), probe::scsi.iodispatching(3stap), probe::scsi.iodone(3stap), probe::scsi.iocompleted(3stap), probe::scsi.ioexecute(3stap), probe::scsi.set_state(3stap), stap(1), stapprobes(3stap) IBM
--- tapset::scsi(3stap)