Input file
Output File
Basically if Column 2 ( which is in GB's) is less then 10 , convert into MB ( x 1024) and calculate its 90% value ( rounded off) and add it to column 5 , also change G's into M's ... for column 2 which is greater than 10 ... just calculate 90% of it and add it to column 5 as it is
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 All,
I want to find the percentage occupied by the directory in the file system.
Say, i have the file system
/home/arun/work
under this file system i have the directories
/home/arun/work/yesterday
/home/arun/work/today
/home/arun/work/tomorrow
The size of the file system is... (5 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)
So, I know this can be done but my awk and sed wizardry is not up to snuff for the job. Basically, I have tons and tons of Macbooks at my work and I am trying to grab the current percentage of the battery power on each client.
If I use the system_profiler SPPowerDataType command it prints off... (4 Replies)
Hi all
i have a text file with columns delimited with ,
2010-08-18,10,24,.09751,39,7,14872,26732
.
.
.
i would to add a extra column in the end with percentage calculation of columns 5 and 8 ie (39/26732)*100
so the output must look like
... (6 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)
looks like awk gets confused when there's a % next to a number.
command im running:
awk -F" " '/phxnaz001b/ && /vol/ && NF { if (($NF >= 80) && ($NF < 83)) { print ; print ; w++ } else if ($NF >= 83) { print ; c++ } } END { printf("%d:OK %d:WARNING %d:CRITICAL\n", o, w, c) }' /tmp/test.log
... (3 Replies)
i have a file say test with the below mentioned details
Folder Name Total space Space used
/test/test1 500.1GB 112.0 GB
/test/test2 3.2 TB 5TB
/test/test3 3TB 100GB
i need to calculate percentage of each row based on total space and space used and copy... (9 Replies)
having two columns, A and B.. i need to add another column C in a file and calculate the percentage based on the column A and B. (COLUMN B/ COLUMN A *100) . "|" is delimiter separating the A and B.. need C column with the percentage value. Thanks for your help
100|50 |50% ... (6 Replies)
mlib_VolumeRayCast_General(3MLIB) mediaLib Library Functions mlib_VolumeRayCast_General(3MLIB)NAME
mlib_VolumeRayCast_General, mlib_VolumeRayCast_General_Parallel_Nearest_U8_Bit, mlib_VolumeRayCast_General_Parallel_Nearest_U8_U8,
mlib_VolumeRayCast_General_Parallel_Nearest_S16_S16, mlib_VolumeRayCast_General_Parallel_Trilinear_U8_U8, mlib_VolumeRayCast_General_Paral-
lel_Trilinear_S16_S16, mlib_VolumeRayCast_General_Divergent_Nearest_U8_Bit, mlib_VolumeRayCast_General_Divergent_Nearest_U8_U8, mlib_Vol-
umeRayCast_General_Divergent_Nearest_S16_S16, mlib_VolumeRayCast_General_Divergent_Trilinear_U8_U8, mlib_VolumeRayCast_General_Diver-
gent_Trilinear_S16_S16 - cast a ray (or rays) through a 3D data set
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_VolumeRayCast_General_Parallel_Nearest_U8_Bit(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Parallel_Nearest_U8_U8(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Parallel_Nearest_S16_S16(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Parallel_Trilinear_U8_U8(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Parallel_Trilinear_S16_S16(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Divergent_Nearest_U8_Bit(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Divergent_Nearest_U8_U8(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Divergent_Nearest_S16_S16(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Divergent_Trilinear_U8_U8(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
mlib_status mlib_VolumeRayCast_General_Divergent_Trilinear_S16_S16(
mlib_rays *rays, const mlib_genvolume *vol, void *buffer);
DESCRIPTION
Each of these functions casts a ray (or rays) through a three-dimensional(3D) data set, then computes and returns the interpolated samples
at each step along the way.
In trilinear interpolation, the value at point P is computed from its eight surrounding neighbors based on the equation below.
P = (1-a)*(1-b)*(1-c)*P0 +
a*(1-b)*(1-c)*Px + (1-a)*b*(1-c)*Py + (1-a)*(1-b)*c*Pz +
a*b*(1-c)*Pxy + a*(1-b)*c*Pxz + (1-a)*b*c*Pyz +
a*b*c*Pxyz
where a, b, and c are the fractional parts of the coordinates of point P.
The trilinear interpolation is represented by the following figure:
Printed copy or docs.sun.com displays a figure that represents the trilinear interpolation.
In nearest neighbor operation, the sample value at point P is replaced by the value of the nearest neighbor voxel.
PARAMETERS
Each of the functions takes the following arguments:
rays Casting rays.
vol Volume data that consists of slices.
buffer Working buffer.
RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_VolumeRayCast_Blocked(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_VolumeRayCast_General(3MLIB)