Sponsored Content
Top Forums Shell Programming and Scripting Wants alternate to the Sleep option?? Post 302291674 by satyajit007 on Thursday 26th of February 2009 05:46:08 AM
Old 02-26-2009
syntax error

Sir....It is giving the following error.....

savouch_75002_20090210_20090226160640.out/appdb/product/agent/tmp/AAAjzaWJcsyntax error at -e line 1, near "; exit"
Execution of -e aborted due to compilation errors.

Started

PL/SQL procedure successfully completed.

/appdb/product/batch/rms/pos/RTLOG_GCN1.TXT
2
./saimptlogi_batch.sh[17]: ./saimptlogi: not found
syntax error at -e line 1, near "; exit"
Execution of -e aborted due to compilation errors.
Started

Also i think we should close { $pid{$1}++; exit 1 if ($pid{$1} >= 2)' .....with a } bracket ???

Last edited by satyajit007; 02-26-2009 at 06:51 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alternate way for echo.

Hi, Is there any other command echo does. if I am doing this operation for each line in my file. So its taking very long time to process more than 1000 records. Is there any alternative way to write the above if statement (5 Replies)
Discussion started by: senthil_is
5 Replies

2. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

3. Shell Programming and Scripting

alternate lines

Hi, I'm new to Unix. I want to read the all the lines from a text file and write the alternate lines into another file. Please give me a shell script solution. file1 ----- one two three four five six seven newfile(it should contain the alternate lines from the file1) ------- one... (6 Replies)
Discussion started by: pstanand
6 Replies

4. Shell Programming and Scripting

Wrapping 'sleep' with my 'resleep' function (Resettable sleep)

This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way: How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies

5. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

6. Shell Programming and Scripting

Alternate to SLEEP for EXPECT within BASH script?

Fairly new to the System Admin world, and this is my first post here, hoping to get some clarification. I am using a BASH script to automate some Logfile Archiving (into .tars). The actual logfiles are accessed through an SSH, so I have used the following EXPECT sub-script within my main BASH... (8 Replies)
Discussion started by: Goatfarmer03
8 Replies

7. UNIX for Dummies Questions & Answers

Alternate for pwdx in HPUX

I need alternate command as pwdx does not work on HP-UX mymachine B.11.31 U ia64 3223107173 unlimited-user license (6 Replies)
Discussion started by: mohtashims
6 Replies

8. HP-UX

Alternate for wget

Hi, Whats the alternate for wget in HP-UX ? (4 Replies)
Discussion started by: mohtashims
4 Replies

9. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python setup.py install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies
wait3(3C)						   Standard C Library Functions 						 wait3(3C)

NAME
wait3, wait4 - wait for process to terminate or stop SYNOPSIS
#include <sys/wait.h> #include <sys/time.h> #include <sys/resource.h> pid_t wait3(int *statusp, int options, struct rusage *rusage); pid_t wait4(pid_t pid, int *statusp, int options, struct rusage *rusage); DESCRIPTION
The wait3() function delays its caller until a signal is received or one of its child processes terminates or stops due to tracing. If any child process has died or stopped due to tracing and this has not already been reported, return is immediate, returning the process ID and status of one of those children. If that child process has died, it is discarded. If there are no children, -1 is returned immediately. If there are only running or stopped but reported children, the calling process is blocked. If statusp is not a null pointer, then on return from a successful wait3() call, the status of the child process is stored in the integer pointed to by statusp. *statusp indicates the cause of termination and other information about the terminated process in the following man- ner: o If the low-order 8 bits of *statusp are equal to 0177, the child process has stopped; the 8 bits higher up from the low-order 8 bits of *statusp contain the number of the signal that caused the process to stop. See signal.h(3HEAD). o If the low-order 8 bits of *statusp are non-zero and are not equal to 0177, the child process terminated due to a signal; the low-order 7 bits of *statusp contain the number of the signal that terminated the process. In addition, if the low-order seventh bit of *statusp (that is, bit 0200) is set, a ``core image'' of the process was produced; see signal.h(3HEAD). o Otherwise, the child process terminated due to an exit() call; the 8 bits higher up from the low-order 8 bits of *statusp con- tain the low-order 8 bits of the argument that the child process passed to exit(); see exit(2). The options argument is constructed from the bitwise inclusive OR of zero or more of the following flags, defined in <sys/wait.h>: WNOHANG Execution of the calling process is not suspended if status is not immediately available for any child process. WUNTRACED The status of any child processes that are stopped, and whose status has not yet been reported since they stopped, are also reported to the requesting process. If rusage is not a null pointer, a summary of the resources used by the terminated process and all its children is returned. Only the user time used and the system time used are currently available. They are returned in the ru_utime and ru_stime, members of the rusage struc- ture, respectively. When the WNOHANG option is specified and no processes have status to report, wait3() returns 0. The WNOHANG and WUNTRACED options may be combined by the bitwise OR operation of the two values. The wait4() function is an extended interface. If pid is 0, wait4() is equivalent to wait3(). If pid has a nonzero value, wait4() returns status only for the indicated process ID, but not for any other child processes. If pid has a negative value, wait4() return status only for child processes whose process group ID is equal to the absolute value of pid. The status can be evaluated using the macros defined by wait.h(3HEAD). RETURN VALUES
If wait3() or wait4() returns due to a stopped or terminated child process, the process ID of the child is returned to the calling process. Otherwise, -1 is returned and errno is set to indicate the error. If wait3() or wait4() return due to the delivery of a signal to the calling process, -1 is returned and errno is set to EINTR. If WNOHANG was set in options, it has at least one child process specified by pid for which status is not available, and status is not available for any process specified by pid, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. The wait3() and wait4() functions return 0 if WNOHANG is specified and there are no stopped or exited children, and return the process ID of the child process if they return due to a stopped or terminated child process. Otherwise, they return -1 and set errno to indicate the error. ERRORS
The wait3() and wait4() functions will fail and return immediately if: ECHILD The calling process has no existing unwaited-for child processes. EFAULT The statusp or rusage arguments point to an illegal address. EINTR The function was interrupted by a signal. The value of the location pointed to by statusp is undefined. EINVAL The value of options is not valid. The wait4() function may fail if: ECHILD The process specified by pid does not exist or is not a child of the calling process. The wait3()and wait4() functions will terminate prematurely, return -1, and set errno to EINTR upon the arrival of a signal whose SA_RESTART bit in its flags field is not set (see sigaction(2)). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
kill(1), exit(2), waitid(2), waitpid(3C), getrusage(3C), signal(3C), signal.h(3HEAD), wait(3C), wait.h(3HEAD), proc(4), attributes(5) NOTES
If a parent process terminates without waiting on its children, the initialization process (process ID = 1) inherits the children. The wait3() and wait4() functions are automatically restarted when a process receives a signal while awaiting termination of a child process, unless the SA_RESTART bit is not set in the flags for that signal. SunOS 5.11 4 Nov 2005 wait3(3C)
All times are GMT -4. The time now is 04:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy