04-27-2010
Hi Aigles,
Still M getting the result of first process alone..
Plz can u help me..
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, I'm confused about the proper syntax for multi-conditional if then statements. I'm trying to set limitations on info input on the command line.. i.e.
if ] ;then
$x=$vr1
else
print "You have entered an invalid option."
Can someone please clue me in on what is wrong with my syntax;... (3 Replies)
Discussion started by: tim mauger
3 Replies
2. Shell Programming and Scripting
I have a shell script which resides on three SCO machines containing some simple sqlplus statments. I need to run these scripts remotely. Currently, I am trying to use rsh to do so:
rsh hostname myscript args
The problem is that the arguments to the sqlplus statements in the remote shell... (4 Replies)
Discussion started by: Madbreaks
4 Replies
3. Shell Programming and Scripting
I want to do multiple comparisons on a series of numbers from an array:
I send the numbers in file1 through want to print out some info from file2 based on some conditions.
The syntax just isn't correct???
awk '
NR==FNR{
a=$0
next
... (2 Replies)
Discussion started by: dcfargo
2 Replies
4. Shell Programming and Scripting
Please help me. I have been doing this for several hours.
Here is the code
if then
echo a b c d >> file.txt
echo 1111 >> file.txt
fi
The reason I want the two echo is because I want these statements printed on multiple lines. I keep getting error .
First it tells me... (2 Replies)
Discussion started by: asemota
2 Replies
5. Shell Programming and Scripting
how can we execute multiple statements in
else condition
i have
if
then
statement
else
statements
fi
in else condition i have multiple statements
but it executing only one statement
is there any way to execute multiple statements (4 Replies)
Discussion started by: nani1984
4 Replies
6. Shell Programming and Scripting
Hi ,
I have a peculiar problem.
i have an if block like this
if ;
then
echo " todays date is " ${date} >> log_file
echo " file count is " $ count >> log_file
mv filename1 filename 2
else
echo "no files available ">> log_file
fi
the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies
7. Shell Programming and Scripting
Hi All,
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
if
then
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
Discussion started by: ch33ry
4 Replies
8. Shell Programming and Scripting
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
Discussion started by: nickzourdos
3 Replies
9. UNIX for Dummies Questions & Answers
exmaple:
file1 and file2 has 1 bit
if
then
exit
else
send out email
fi
if
then
exit
else
send out email
fi
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Discussion started by: lawsongeek
7 Replies
10. Shell Programming and Scripting
Hello,
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
andy
stephane
aby
paul
$ cat file2
123
234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
getpid(2) System Calls Manual getpid(2)
NAME
getpid(), getpgid(), getpgrp(), getpgrp2(), getppid() - get process, process group and parent process ID.
SYNOPSIS
DESCRIPTION
These functions return process, process group and parent process IDs, as follows:
Process group ID of the specified process.
If pid is zero, the call applies to the calling process. Same result as
Process group ID of the calling process.
Process group ID of the specified process.
If pid is zero, the call applies to the calling process. Same result as
Process ID of the calling process.
Parent process ID of the calling process.
If the parent process is the initialization process (known as the call returns 1.
Security Restrictions
The system call is subject to compartmental restrictions. See compartments(5) for more information about compartmentalization on systems
that support that feature.
Compartmental restrictions can be overridden if the process possesses the privilege (PRIV_COMMALLOWED). Processes owned by the superuser
may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. See privileges(5)
for more information about privileged access on systems that support fine-grained privileges.
RETURN VALUE
The functions return the following values:
Successful completion.
n is a nonnegative process ID, as described above.
Failure:
and only. is set to indicate the error.
ERRORS
If or fails, is set to one of the following values:
[EPERM] The current process and pid are not in the same session (see setsid(2)).
[ESRCH] No process can be found corresponding to that specified by pid.
AUTHOR
and were developed by HP, AT&T, and the University of California, Berkeley.
SEE ALSO
exec(2), fork(2), setpgid(2), setsid(2), signal(5).
STANDARDS CONFORMANCE
getpid(2)