10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.
I need to check the file is present ="/home/Rvtools/test.csv"
if this file not found after the time retry send mail file not found
If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
2. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
3. Shell Programming and Scripting
Hi All,
Is there any way to check exit status of unset variables?
In the following code PathX is not set and the script terminates without checking exit status.
#!/bin/bash
Path="/tmp/log"
cd ${PathX:?}
if ;then
echo "Exit Status : non zero"
else
echo "Exit Status :... (2 Replies)
Discussion started by: sussus2326
2 Replies
4. Shell Programming and Scripting
Hi I have following code
I want If whole code executes successfully then return true If found any error then print the error
I tried if ; then
But this checks only for the just upper line execution
#!/bin/bash
PATH1=/var/log/mysql
PATH2=/home/ankur/log
FILE1=mysql-bin.index... (4 Replies)
Discussion started by: kaushik02018
4 Replies
5. Shell Programming and Scripting
HI All,
I am running one shell script, in that script i am calling 4 scripts in the background.
abc.ksh &
efg.ksh &
xky.ksh &
mno.ksh &
please let me know, how could i find the success and failure of each script.
i Cannot use $?, because i want to run all the scripts in parellel.
... (2 Replies)
Discussion started by: javeed7
2 Replies
6. Shell Programming and Scripting
Hi all,
I'm running a program which return 1 upon success.
But when encounters problem shell return 's '1' .
How to differentiate between them the shell return value and script return value.
Ex. function fn return '1' if executed successfully and '0' if failed. But when if shell encounters... (1 Reply)
Discussion started by: yhacks
1 Replies
7. Shell Programming and Scripting
from my main script, i am calling an expect script. there are a lot of conditions in the Expect script and it can have any exit value based on success or failure of the Expect Script. how can i check the exit status of Expect scritp in the main script. (1 Reply)
Discussion started by: iamcool
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am trying to test the exit status of the cleartool lsvtree statement below, but it doesn't seem to be working due to the tail pipe, which it is testing instead. Is there a way around this without adding a tonne of new code?
cleartool lsvtree $testlocation/$exe_name | tail -15
... (10 Replies)
Discussion started by: topcat8
10 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a main program which have below lines
-
awk -f test.awk inputFileName
-
I wonder how to check status return from awk script.
content of awk script:
test.awk
---
if ( pass validation )
{
exit 1
}
else
{ (1 Reply)
Discussion started by: epall
1 Replies
10. Shell Programming and Scripting
Hi,
We have a text file which has the following data.
ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183
7~U~00200~000011258~0~P~<
GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002
ST~997~0001
AK1~SH~247
AK2~856~2470001
AK5~A
AK2~856~2470002
AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies
PIPE(2) BSD System Calls Manual PIPE(2)
NAME
pipe -- create descriptor pair for interprocess communication
SYNOPSIS
#include <unistd.h>
int
pipe(int fildes[2]);
DESCRIPTION
The pipe() function creates a pipe (an object that allows unidirectional data flow) and allocates a pair of file descriptors. The first
descriptor connects to the read end of the pipe; the second connects to the write end.
Data written to fildes[1] appears on (i.e., can be read from) fildes[0]. This allows the output of one program to be sent to another pro-
gram: the source's standard output is set up to be the write end of the pipe; the sink's standard input is set up to be the read end of the
pipe. The pipe itself persists until all of its associated descriptors are closed.
A pipe whose read or write end has been closed is considered widowed. Writing on such a pipe causes the writing process to receive a SIGPIPE
signal. Widowing a pipe is the only way to deliver end-of-file to a reader: after the reader consumes any buffered data, reading a widowed
pipe returns a zero count.
The generation of the SIGPIPE signal can be suppressed using the F_SETNOSIGPIPE fcntl command.
RETURN VALUES
On successful creation of the pipe, zero is returned. Otherwise, a value of -1 is returned and the variable errno set to indicate the error.
ERRORS
The pipe() call will fail if:
[EFAULT] The fildes buffer is in an invalid area of the process's address space.
[EMFILE] Too many descriptors are active.
[ENFILE] The system file table is full.
SEE ALSO
sh(1), fork(2), read(2), socketpair(2), fcntl(2), write(2)
HISTORY
A pipe() function call appeared in Version 6 AT&T UNIX.
4th Berkeley Distribution February 17, 2011 4th Berkeley Distribution