01-30-2010
Double post, continued
here
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Whats up fellas, I am new here... just wanted to see if anyone knew a way to get an avergage of a list of numbers... I am trying to use bc (number of records in file divided by sum of all records in file) but it is not giving me accurate data.
IE:
... (2 Replies)
Discussion started by: djsal
2 Replies
2. Shell Programming and Scripting
Is there a way that i can get something like this to work:
Number=`expr 80 \* 10.69`
i.e. To multiply an integer by a decimal or a decimal by a decimal etc...?
thanks (10 Replies)
Discussion started by: rleebife
10 Replies
3. Shell Programming and Scripting
Hi All,
How we can handle decimals in (Float) in UNIX.
a=73
b=5
c=`expr a / b`
i am getting 14 but i need full 14.6 .
Can any one help me pls? (1 Reply)
Discussion started by: subin_bala
1 Replies
4. Shell Programming and Scripting
I need to get 15% of the variable exer1 to be added to other exercises
so far, i've got
exer1=$1
aver=`expr $exer \* .15`
but i keep getting an error that an integer value was expected. Is there anyway around this? (1 Reply)
Discussion started by: kdyzsa
1 Replies
5. Shell Programming and Scripting
Hi,
I am trying to find if there is a way to convert regular decimal values to Paced decimal values. I tried to find a c program but I could get a Packed converted to regular decimal not the other way round.
If not unix please let me know if any other progrimming language I can use to do... (2 Replies)
Discussion started by: mgirinath
2 Replies
6. Shell Programming and Scripting
How to multiple decimals in Linux?
When I do it like this i get an error message
echo "$((1 * 1.1))"
-bash: 1 * 1.1: syntax error in expression (error token is ".1") (4 Replies)
Discussion started by: 3junior
4 Replies
7. Shell Programming and Scripting
Hello,
I want to run a loop with non-integer values (which I know I can't) so I've created a loop of integers and divided it by 10. However, these values are always rounded down to 1 significant figure. How do I get the script to keep and use the decimal value?
My script is as follows
#... (1 Reply)
Discussion started by: DFr0st
1 Replies
8. Shell Programming and Scripting
Hi All,
I would like to do the following in the shell script
561.76 to 562
I tried using this echo 'scale=0; 749 * 75 /100 ' | bc
but just returned only 561
Please help me . I appreciate your help
Thanks
rajeevm (13 Replies)
Discussion started by: rajeevm
13 Replies
9. Shell Programming and Scripting
I am trying to get date to display decimal
Desired output 1350386096256.12
I know this can be done with printf, but are not able to make it work.
I have tested this and many otherprintf "%.2f" $(($(date +%s%N)/1000000)) (8 Replies)
Discussion started by: Jotne
8 Replies
10. Shell Programming and Scripting
Hi Gurus,
I have below sample file, I need find the line which 2rd field has more than 2 decimals.
in sample file, I need to find xyz, 123456.789
abc, 1234.45, def
xyz, 123456.789, xxx
bce, 1234.34, xxx
thanks in advance (13 Replies)
Discussion started by: ken6503
13 Replies
LEARN ABOUT HPUX
pnmconvol
pnmconvol(1) General Commands Manual pnmconvol(1)
NAME
pnmconvol - general MxN convolution on a portable anymap
SYNOPSIS
pnmconvol convolutionfile [pnmfile]
DESCRIPTION
Reads two portable anymaps as input. Convolves the second using the first, and writes a portable anymap as output.
Convolution means replacing each pixel with a weighted average of the nearby pixels. The weights and the area to average are determined by
the convolution matrix. The unsigned numbers in the convolution file are offset by -maxval/2 to make signed numbers, and then normalized,
so the actual values in the convolution file are only relative.
Here is a sample convolution file; it does a simple average of the nine immediate neighbors, resulting in a smoothed image:
P2
3 3
18
10 10 10
10 10 10
10 10 10
To see how this works, do the above-mentioned offset: 10 - 18/2 gives 1. The possible range of values is from 0 to 18, and after the off-
set that's -9 to 9. The normalization step makes the range -1 to 1, and the values get scaled correspondingly so they become 1/9 - exactly
what you want. The equivalent matrix for 5x5 smoothing would have maxval 50 and be filled with 26.
The convolution file will usually be a graymap, so that the same convolution gets applied to each color component. However, if you want to
use a pixmap and do a different convolution to different colors, you can certainly do that.
At the edges of the convolved image, where the convolution matrix would extend over the edge of the image, pnmconvol just copies the input
pixels directly to the output.
SEE ALSO
pnmsmooth(1), pnm(5)
AUTHORS
Copyright (C) 1989, 1991 by Jef Poskanzer.
Modified 26 November 1994 by Mike Burns, burns@chem.psu.edu
26 November 1994 pnmconvol(1)