how would you calculate percentage by per line? Given a column of 16 lines, grab each line and divide it by the sum of the entire column and multiply by 100?
thanks ... (8 Replies)
Hi
I need a awk script to calculate percentage.
I have to pass the pararmeters in to the awk script and calculate the percentage.
Sum = 50
passed = 43
failed = 7
I need to pass these value in to the awk script and calculate the percentage.
Please advice me. (8 Replies)
Hi,
I have a log like this :
actually i want to get the log like this :
where % can get from :
100 * pmTotNoRrcConnectReqSucc / pmTotNoRrcConnectReq
Thanks in advance.. :) (8 Replies)
hello,
please can you help me.
jj and kk are two numbers which are the result of an sql program.
I would like to calculate the ratio jj/kk*100.
I have done this:
ratio=$((jj/kk * 100)) or ratio=`expr $jj \/ expr $kk) but the result is 0
What can i do?
Thanks for help. (3 Replies)
Hi all,
I havea log of data.log
bear,10000,white
bear,5000,black
chicken,2000,white
chicken,4000,yellow
chicken,3000,black
lion,6000,yellow
lion,1000,white
How can we have shell script to get the percentage of each animals?
Thanks. (8 Replies)
Need an awk script to calculate the percentage of value field and replace
I have a input file called file.txt with the following content:
john|622.5674603562933|8|br:1;cn:3;fr:1;jp:1;us:2
andy|0.0|12|**:3;br:1;ca:2;de:2;dz:1;fr:2;nl:1
in fourth filed of input file, calulate percentage of each... (1 Reply)
I have a input file called file.txt with the following content:
john|622.5674603562933|8|br:1;cn:3;fr:1;jp:1;us:2
andy|0.0|12|**:3;br:1;ca:2;de:2;dz:1;fr:2;nl:1
in fourth filed of input file, calulate percentage of each sub filed seperated by ; semicolon and replace value with percentage .
i... (11 Replies)
Hello,
I am trying to compute the percentage in a script as shown below:
PerCover=`echo "scale=2 ; 100 \* ($InputCover/$Total)" | bc`
However the PerCover value is blank/null. What do I need to do differently?
Thanks for your input!
~Guss (1 Reply)
Hi All,
I currently have a shell script which is pulling multiple counters from various sources. Due to the counters being cumulative counters I've got some code to work out the delta from the last reading and current which is working fine.
The problem i have now is being able to work out the... (8 Replies)
Discussion started by: mutley2202
8 Replies
LEARN ABOUT PHP
ps_makespotcolor
PS_MAKESPOTCOLOR(3) 1 PS_MAKESPOTCOLOR(3)ps_makespotcolor - Create spot colorSYNOPSIS
int ps_makespotcolor (resource $psdoc, string $name, [int $reserved])
DESCRIPTION
Creates a spot color from the current fill color. The fill color must be defined in rgb, cmyk or gray colorspace. The spot color name can
be an arbitrary name. A spot color can be set as any color with ps_setcolor(3). When the document is not printed but displayed by an post-
script viewer the given color in the specified color space is use.
PARAMETERS
o $psdoc
- Resource identifier of the postscript file as returned by ps_new(3).
o $name
- Name of the spot color, e.g. Pantone 5565.
RETURN VALUES
The id of the new spot color or 0 in case of an error.
EXAMPLES
Example #1
Creating and using a spot color
<?php
$ps = ps_new();
if (!ps_open_file($ps, "spotcolor.ps")) {
print "Cannot open PostScript file
";
exit;
}
ps_set_info($ps, "Creator", "spotcolor.php");
ps_set_info($ps, "Author", "Uwe Steinmann");
ps_set_info($ps, "Title", "Spot color example");
ps_begin_page($ps, 596, 842);
ps_setcolor($ps, "fill", "cmyk", 0.37, 0.0, 0.34, 0.34);
$spotcolor = ps_makespotcolor($ps, "PANTONE 5565 C", 0);
ps_setcolor($ps, "fill", "spot", $spotcolor, 0.5, 0.0, 0.0);
ps_moveto($ps, 100, 100);
ps_lineto($ps, 100, 200);
ps_lineto($ps, 200, 200);
ps_lineto($ps, 200, 100);
ps_lineto($ps, 100, 100);
ps_fill($ps);
ps_end_page($ps);
ps_delete($ps);
?>
This example creates the spot color "PANTONE 5565 C" which is a darker green (olive) and fills a rectangle with 50% intensity.
SEE ALSO ps_setcolor(3).
PHP Documentation Group PS_MAKESPOTCOLOR(3)