03-14-2011
You've still given no context, so I can't explain why they're doing what they do.
I don't know what that "PID" variable is. It must have been set somewhere else. I don't know what SC is either. I also don't know why they're checking for 7, or what tommcumulative is.
All I can tell you is, it's doing this: "if the first token is tommcumulative, and the PID is 7, print the string ",CUM_READ = to_number(%d,'XXXXXXXXXX')\n", substituting the second token times SC for %d. Otherwise, print ",CUM_READ = %d\n", substituting the second token times SC for %d. And if the first token isn't tommcumulative, don't do anything inside this block at all."
In the second line, they're matching lines containing the text "txOnlyProtocolID" from the file $remoteTmpOnDir/ond.tmp.$1. I don't know what $remoteTmpOnDir is, that must have been set earlier. I don't know what $1 is, that's the first parameter of the script. And they feed the output through awk, printing only the sixth field, and shoehorn the whole mess into the Protocol_id variable.
Protocol_id=`grep txOnlyProtocolID $remoteTmpOndDir/ond.tmp.$1 | awk '{print $6}'`
For the third one, they're running the awk script $BIN_DIR/odr_crupdt.awk. I don't know what BIN_DIR is, that's something that's set earlier. They're presetting a whole bunch of variables in there, some of which correspond to variables used earlier, like SC=$SCALING_CONST and INT=$DEMAND_INTRVL, and of course that PID variable that got grepped out of that file, whatever it is. What they are and why I couldn't say. What $1 is I also couldn't say.
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
LEARN ABOUT MINIX
ppmtosixel
ppmtosixel(1) General Commands Manual ppmtosixel(1)
NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO
ppm(5)
AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)