Sponsored Content
Full Discussion: AWK equation evaluation.
Top Forums Shell Programming and Scripting AWK equation evaluation. Post 302146858 by vgersh99 on Thursday 22nd of November 2007 02:02:12 PM
Old 11-22-2007
something educational to read up on....
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

equation calculation on Unix

Hay, guys, Any ideas how to calculate like this: in first file, there're number of lines listing 2+3, 6*9 ....... Then, how to get the result and put them in another file in format: 2+3 5 6*9 54 ...... sheerly by shell command, no scripts required. (4 Replies)
Discussion started by: robbinGlasses
4 Replies

2. Shell Programming and Scripting

Perl - maths equation - need help

if input to the perl program is ' ( p * ((a+b) * (c+d))) + q ' it shuld give the output as ' pac + pad + pbc + pbd + q ' .can anyone suggest a way to do this ? (7 Replies)
Discussion started by: Anuj8584
7 Replies

3. High Performance Computing

Performance Equation

I'm running a MPI program using a cluster of 4 machines(different machines of different processing power,cpu utilization etc.). I'm trying to balance the computation among the machine to get the minimum execution time for that. I tried to balance it by creating a threshold value by taking the load... (1 Reply)
Discussion started by: chamila1986
1 Replies

4. Shell Programming and Scripting

Using AWK in IF evaluation in KSH

Hi - I have an expression that evaluates to "Alive" or some other condition. e.g. if I run :- awk -F \| '{gsub(/]*/,"",$4); print $4 }' then the output is "Alive". I want to be able to test this as the result may be some other condition other than "Alive". I have tried the following... (4 Replies)
Discussion started by: sniper57
4 Replies

5. UNIX for Dummies Questions & Answers

cp command evaluation

Hi all! I'm writting one script to copy a file in various folders, but there are 2 things to validate. First that the folder where i'll be cpying exists, and second that i have permissions to copy the file in it. so far i have found the way to validate the folder exists, but when trying to... (6 Replies)
Discussion started by: feliperivera
6 Replies

6. Shell Programming and Scripting

Help with insert a value equation in bash script

HI All, I have a script in bash that i want that script will perform action When the size of a particular folder exceeds the 80%. Here is an example of script that result is exactly 80% : #!/bin/bash CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5) if ];... (1 Reply)
Discussion started by: Aviel.shani
1 Replies

7. Homework & Coursework Questions

Solving heat equation using crank-nicolsan scheme in FORTRAN

! The one-dimensional PDE for heat diffusion equation ! u_t=(D(u)u_x)_x + s where u(x,t) is the temperature, ! D(u) is the diffusivity and s(x,t) is a source term. ! Taking D(u)= 1 and s(x,t)=0 gives ! u_t= u_xx ! uniform one dimensional region |x|<1 for t>0 ! uniform mesh size delta x=0.1 !... (1 Reply)
Discussion started by: watto1
1 Replies

8. Programming

E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.

Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import. It is well known that Euler's Identity E**(i*pi)+1=0 so I decided to experiment Last login: Fri Dec 13 18:27:30 on ttys000 AMIGA:amiga~> python3.8... (0 Replies)
Discussion started by: wisecracker
0 Replies
mlib_ImageMulAlpha_Inp(3MLIB)				    mediaLib Library Functions				     mlib_ImageMulAlpha_Inp(3MLIB)

NAME
mlib_ImageMulAlpha_Inp - alpha channel multiplication, in place SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageMulAlpha_Inp(mlib_image *srcdst, mlib_s32 cmask); DESCRIPTION
The mlib_ImageMulAlpha_Inp() function multiplies color channels by the alpha channel on a pixel by pixel basis, in place. For the MLIB_BYTE image, it uses the following equation: srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-8) For the MLIB_SHORT image, it uses the following equation: srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-15) For the MLIB_USHORT image, it uses the following equation: srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-16) For the MLIB_INT image, it uses the following equation: srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-31) where c and a are the indices for the color channels and the alpha channel, respectively, so c != a. PARAMETERS
The function takes the following arguments: srcdst Pointer to source and destination image. cmask Channel mask to indicate the alpha channel. Each bit of the mask represents a channel in the image. The channel corresponding to the 1 bit of cmask is the alpha channel. RETURN VALUES
The function 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_ImageMulAlpha(3MLIB), mlib_ImageMulAlpha_Fp(3MLIB), mlib_ImageMulAlpha_Fp_Inp(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_ImageMulAlpha_Inp(3MLIB)
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy