Sponsored Content
Full Discussion: Debug script
Operating Systems Linux Ubuntu Debug script Post 303033243 by Don Cragun on Tuesday 2nd of April 2019 05:31:51 AM
Old 04-02-2019
So your script seems to do what you want it to do if it is invoked by you.

How have you installed your script so the system will invoke it before suspending your system and while resuming your system after a suspension?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Debug an Awk Script

I would like to extract the following fields from the text file attached. I copied the contents from a pdf file and pasted them into the text file so I can use awk to extract them. The layout is as listed below. name1,name2,name3,name4,Title,designation,nationality,dob, national ... (1 Reply)
Discussion started by: mboro
1 Replies

2. Shell Programming and Scripting

How to debug the awk script

Hi, How can I debug an awk script? I know that set -x can be used to debug a script. But this will not suite for awk scripts. Can anyone help me? Thanks in advance, Chella (2 Replies)
Discussion started by: chella
2 Replies

3. Shell Programming and Scripting

debug this script

echo "input time in hhmmss" read $st h=`echo $st | cut -c1-2` min=`echo $st | cut -c3-4` s=`echo $st | cut -c5-6` echo "input time in hhmmss" read $end h1=`echo $end | cut -c1-2` min1=`echo $end | cut -c3-4` s1=`echo $end | cut -c5-6` x= `expr $h /* 60 + $min` y= `expr $h1 /* 60 +... (8 Replies)
Discussion started by: abhishek27
8 Replies

4. UNIX for Advanced & Expert Users

How can debug our UNIX shell script?

Hi all, i have two simple questions here... 1. i want to know that how to debug the UNIX shell script? 2. is there any way to handling the exception in UNIX shell script like oracle exception handling? Please provide me those details it would be great help/ Thanks and Regards, MPS... (3 Replies)
Discussion started by: psiva_arul
3 Replies

5. Shell Programming and Scripting

If condition error-please debug my script

Hi All, I have a script which is based on calculating current time The script looks like this: whenever i try to run the script it gives me error:Please advice wherther i have made mistake with if condition or with for loop?? The code : set -x #!/usr/bin/ksh set -x... (7 Replies)
Discussion started by: usha rao
7 Replies

6. Shell Programming and Scripting

Problem with the script, help me debug

Hi, When i run the script ./script.sh sun, this give me no output, it should give me the list of file. If i run the script without the argument it should send me echo inside usage(). What is the problem? please help -Adsi #!/bin/sh ROOT_PATH=/net/icebox/vol/local_images/spins... (2 Replies)
Discussion started by: asirohi
2 Replies

7. Shell Programming and Scripting

Help with debug the script

Hi, I have this script, searches and sets variables, then searches and sets more variables from multiple files. I'd need to debug it a bit. #!/bin/bash egrep $1 `find | grep MAGT` >/tmp/resRA-$$ thread=`sed -n '/{0x/ {s/^.*{0x\(*\).*/\1/p;q}' /tmp/resRA-$$` tag=`sed -n '/Tag=/... (5 Replies)
Discussion started by: Vitoriung
5 Replies

8. Shell Programming and Scripting

Cant debug shell script

Hi I am relatively new in shell scripting Below is the code which i developed but for some reason, it keeps giving me error: /apps/bss/BatchProg/at1/batch/scripts/ksh/TBATLC02.ksh: syntax error at line 41 : `then' unmatched #!/usr/bin/ksh... (4 Replies)
Discussion started by: scripting_newbe
4 Replies

9. Shell Programming and Scripting

Debug script already running

Hello, is it possible to debug a script that is already running "on-demand"? Somehow a command like "set -x" but once you've executed the script. And another one to disable debugging? Thank you (0 Replies)
Discussion started by: asanchez
0 Replies

10. Shell Programming and Scripting

Debug perl script

Hi, I am trying to get squid up and running using a redirector process, and every time I try to load a web page, squid fails miserably. Can some one with perl and squid knowledge take a look at these codes and tell if something is wrong here. #!/usr/bin/perl # $| = 1; @endings = qw/... (0 Replies)
Discussion started by: jamie_123
0 Replies
dispatch_object(3)					   BSD Library Functions Manual 					dispatch_object(3)

NAME
dispatch_object -- General manipulation of dispatch objects SYNOPSIS
#include <dispatch/dispatch.h> void dispatch_retain(dispatch_object_t object); void dispatch_release(dispatch_object_t object); void dispatch_suspend(dispatch_object_t object); void dispatch_resume(dispatch_object_t object); void * dispatch_get_context(dispatch_object_t object); void dispatch_set_context(dispatch_object_t object, void *context); void dispatch_set_finalizer_f(dispatch_object_t object, dispatch_function_t finalizer); DESCRIPTION
Dispatch objects share functions for coordinating memory management, suspension, cancellation and context pointers. While all dispatch objects are retainable, not all objects support suspension, context pointers or finalizers (currently only queues and sources support these additional interfaces). MEMORY MANGEMENT
Objects returned by creation functions in the dispatch framework may be uniformly retained and released with the functions dispatch_retain() and dispatch_release() respectively. The dispatch framework does not guarantee that any given client has the last or only reference to a given object. Objects may be retained internally by the system. SUSPENSION
The invocation of blocks on dispatch queues or dispatch sources may be suspended or resumed with the functions dispatch_suspend() and dispatch_resume() respectively. The dispatch framework always checks the suspension status before executing a block, but such changes never affect a block during execution (non-preemptive). Therefore the suspension of an object is asynchronous, unless it is performed from the context of the target queue for the given object. The result of suspending or resuming an object that is not a dispatch queue or a dispatch source is undefined. Important: suspension applies to all aspects of the dispatch object life cycle, including the finalizer function and cancellation handler. Therefore it is important to balance calls to dispatch_suspend() and dispatch_resume() such that the dispatch object is fully resumed when the last reference is released. The result of releasing all references to a dispatch object while in a suspended state is undefined. CONTEXT POINTERS
Dispatch queues and sources support supplemental context pointers. The value of the context pointer may be retrieved and updated with dispatch_get_context() and dispatch_set_context() respectively. The dispatch_set_finalizer_f() specifies an optional per-object finalizer function that is invoked asynchronously if the context pointer is not NULL when the last reference to the object is released. This gives the application an opportunity to free the context data associated with the object. The result of getting or setting the context of an object that is not a dispatch queue or a dispatch source is undefined. SEE ALSO
dispatch(3), dispatch_group_create(3), dispatch_queue_create(3), dispatch_semaphore_create(3), dispatch_source_create(3) Darwin May 1, 2009 Darwin
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy