03-14-2011
there is a awk script called "odr_crupdt.awk" in which i have the following command.
1) if ($1 == "tommCumulative)")
{
if (PID == 7)
{
printf(",CUM_READ = to_number(%d,'XXXXXXXXXX')\n",$2 * SC)
}
else
{
printf (",CUM_READ = %d\n",$2 * SC)
}
}
that is beingcalled under get_odr.sh in the following way. On line 3 you see "odr_crupdt.awk" being called. and I want to know meaning of line 2 also
line 2) Protocol_id=`grep txOnlyProtocolID $remoteTmpOndDir/ond.tmp.$1 | awk '{print $6}'`
line 3) nawk -f $BIN_DIR/odr_crupdt.awk SC=$SCALING_CONST INT=$DEMAND_INTRVL PID=$Protocol_id $remoteTmpOndDir/ond.info.$1 >> updt_ond_$1.sql
10 More Discussions You Might Find Interesting
1. Programming
question: for the below program
i just printed the value for pid, child pid and parent pid
why does it give me 6 values? i assume ppid is 28086
but can't figure out why there are 5 values printed instead of just two!
can someone comment on that!
#include<stdio.h>
#define DIM 8
int... (3 Replies)
Discussion started by: a25khan
3 Replies
2. Shell Programming and Scripting
The below command returns full line.How can i get only PID from this line ie 15794 from the below example
(FI NY) nbswpsa52.ny.ficc.gs.com~ ->ps -ef | grep keepalive | grep -v keepaliveStub | grep -v swapback | grep -v grep
ficctprd 15794 1 0 13:12:58 ? 0:01 keepalive (3 Replies)
Discussion started by: kotasateesh
3 Replies
3. UNIX for Dummies Questions & Answers
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies
4. Shell Programming and Scripting
Hi All,
In my project i have two process runs in the back end.
Once i start my project, and execute the command ps, i get below output:
PID TTY TIME CMD
9086 pts/1 0:00 ksh
9241 pts/1 0:02 java
9240 pts/1 0:00 shell_script_bg
java with 9241 PID is the main... (4 Replies)
Discussion started by: rkrgarlapati
4 Replies
5. Shell Programming and Scripting
How can I put the process id of ,for example, the following script to the pid file? Maybe $$ must be defined in some place?
daemon(){
while true;
do
if
then
echo "`date +"%H:%M:%S"`" >> $FILE
... (4 Replies)
Discussion started by: mirusnet
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
7. UNIX for Dummies Questions & Answers
I have searched to find an anwer to no avail, I hope you can help me.
I have a.ksh that many people call and a.ksh calls b.ksh
b.ksh is also invoked stand-alone by many people as well
In b.ksh I want to do something different if it was not involked by a.ksh.
How can I do this? (7 Replies)
Discussion started by: CAGIRL
7 Replies
8. Shell Programming and Scripting
Hi All,
I am getting the PID of a process using its name using the following command
in a script
mypid=`ps aux | awk '/test5/ && !/awk/ { print $2 }'`
echo PID is $mypid
The problem is the PID is not getting printed. But when i run the command directly in shell, the PID got printed.
... (2 Replies)
Discussion started by: amio
2 Replies
9. UNIX for Dummies Questions & Answers
name the process wit PID value 0? swapper or scheduler or both.... (3 Replies)
Discussion started by: karthi_g
3 Replies
10. Shell Programming and Scripting
Hello,
I'm trying to select, or well put the PID that is given by fuser to a var.. It has a wierd format and I somehow can't get it working, any awk/sed experts about?
PID=`fuser $file | awk/sed....?`
if ; then
kill $PID
fi
Greetings and thanks for all your awesome help in advance! (4 Replies)
Discussion started by: TehOne
4 Replies