Sponsored Content
Top Forums Shell Programming and Scripting status of perl script in another ... Post 39047 by jo_aze on Tuesday 5th of August 2003 04:02:33 AM
Old 08-05-2003
Thanks but do you know if there is a syntax calling proc_sub with arguments:

require proc_sub "arg1" "arg2" ... "argn" # ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get exit status codes in bash from Perl?

I apologize if I have already posted this query. I scanned back quite a few pages but could not find such a query. If my perl code contains "exit(33)" how can I get that value in bash for use in a "if" statement. Thanks, Siegfried (5 Replies)
Discussion started by: siegfried
5 Replies

2. Shell Programming and Scripting

perl - understand process status and continue the code execution

Hello, I need advice on how to check if started processes are finished in perl, here's explanation : OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi" The logic of the script : #!/usr/bin/perl use warnings; $param1 = $ARGV; $param2 = $ARGV; $param3 =... (2 Replies)
Discussion started by: sysgate
2 Replies

3. Shell Programming and Scripting

capturing C++ binary return status in perl

Hello, I have a C++ binary that runs in my perl script. But, Currently, the binary is doing a core dump and i want to capture the retrun status of the binary to report as an issue. Can you please help me on this. Thanks, Sateesh (1 Reply)
Discussion started by: kotasateesh
1 Replies

4. Shell Programming and Scripting

capturing C++ binary return status in perl

Hello, I have a C++ binary that runs in my perl script. But, Currently, the binary is doing a core dump and i want to capture the retrun status of the binary to report as an issue. Can you please help me on this. Thanks, Sateesh (1 Reply)
Discussion started by: kotasateesh
1 Replies

5. Shell Programming and Scripting

how to find status of last executed cmd in perl?

In shell we can find the status of last executed command by $? In perl what is the command to find the status of last executed command... Can any one please say??????????????? Thanks, Prabhu (1 Reply)
Discussion started by: prsampath
1 Replies

6. Shell Programming and Scripting

status bar in shell script or perl

How To Generate different different progress bar in shell script? like we install some software it show us progress, like we install RPM that also show us progress. Thanks, Bash (2 Replies)
Discussion started by: learnbash
2 Replies

7. Shell Programming and Scripting

Perl Question Grep and exit status

Im being forced to write in perl. I prefer KSH or Expect, so I suppose its time to become more fluent with perl. I have the following problem. I want to loop through Filea and check that each line in Filea is resident in Fileb. Filea contents two four six eight houseboat Fileb... (4 Replies)
Discussion started by: sumguy
4 Replies

8. Shell Programming and Scripting

Shell Script for continuously checking status of a another script running in background, and immedia

Hi, I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help.. i am using below command to run script nohup system_traps.sh & but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies

9. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

10. Shell Programming and Scripting

Need output of script on screen and file with correct return status of the called script.

Hi, I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed. Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
WaitStat(3pm)						User Contributed Perl Documentation					     WaitStat(3pm)

NAME
Proc::WaitStat - Interpret and act on wait() status values SYNOPSIS
$description = waitstat $?; exit waitstat_reuse $?; waitstat_die $?, 'program-name'; close_die COMMAND, 'program-name'; DESCRIPTION
This module contains functions for interpreting and acting on wait status values. Nothing is exported by default. waitstat wait-status Returns a string representation of wait() status value wait-status. Values returned are like "0" and "64" and "killed (SIGHUP)". This function is prototyped to take a single scalar argument. waitstat_reuse wait-status Turn wait-status into a value which can be passed to exit, converted in the same manner the shell uses. If wait-status indicates a normal exit, return the exit value. If wait-status instead indicates death by signal, return 128 plus the signal number. This function is prototyped to take a single scalar argument. waitstat_die wait-status program-name die() if wait-status is non-zero (mentioning program-name as the source of the error). This function is prototyped to take two scalar arguments. close_die filehandle name Close filehandle, if that fails die() with an appropriate message which refers to name. This handles failed closings of both programs and files properly. This function is prototyped to take a filehandle (actually, a glob ref) and a scalar. EXAMPLES
close SENDMAIL; exit if $? == 0; log "sendmail failure: ", waitstat $?; exit EX_TEMPFAIL; $pid == waitpid $pid, 0 or croak "Failed to reap $pid: $!"; exit waitstat_reuse $?; $output = `some-program -with args`; waitstat_die $?, 'some-program'; print "Output from some-process: ", $output; open PROGRAM, '| post-processor' or die "Can't fork: $!"; while (<IN>) { print PROGRAM pre_process $_ or die "Error writing to post-processor: $!"; } # This handles both flush failures at close time and a non-zero exit # from the subprocess. close_die PROGRAM, 'post-processor'; AUTHOR
Roderick Schertler <roderick@argon.org> SEE ALSO
perl(1), IPC::Signal(3pm). perl v5.8.8 1999-10-27 WaitStat(3pm)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy