08-15-2008
Calculating the Number of Rows and Average
Hi All
I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file.
eg.
29
33
48
30
28
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is the cronjob
----------------------
root@a7germ:/home/paxtemp > crontab -l|grep test
57 * * * * /home/paxtemp/test_1.sh
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/paxtemp/test.sh
root@a7germ:/home/paxtemp >
This is the contents of test.sh script... (2 Replies)
Discussion started by: kekanap
2 Replies
2. Shell Programming and Scripting
Hi friends
I have 100 files in my directory. Each file look like this..
Temp1 Temp2 Temp3
MAS 1 2 3
MAS 4 5 6
MAS 7 8 9
Delhi 10 11 12
Delhi 13 14 15
Delhi 16 17 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
3. Shell Programming and Scripting
Hi Friends,
In continuation to my earlier post
https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html
I am extending my problem as follows.
Input:
Column1 Column2
MAS 1
MAS 4 ... (2 Replies)
Discussion started by: ks_reddy
2 Replies
4. Shell Programming and Scripting
Dear users,
I need your support, I have a file like this:
272134.548 6680572.715
272134.545 6680572.711
272134.546 6680572.713
272134.548 6680572.706
272134.545 6680572.721
272134.543 6680572.710
272134.544 6680572.715
272134.543 6680572.705
272134.540 6680572.720
272134.544... (10 Replies)
Discussion started by: Gery
10 Replies
5. UNIX for Dummies Questions & Answers
Hi,
i have 12 float variables in a bash file and i want to calculate the average of them.
Can any body help? (6 Replies)
Discussion started by: limadario
6 Replies
6. UNIX for Dummies Questions & Answers
Dear all,
i have 200 values in a file. How can i calculate a weighted average and output into a new file avg.dat?
INPUT:
file1.dat
1.3453
2.434
2.345
.....
OUTPUT:
avg.dat
file1: 1.762
Thanks.
Po (3 Replies)
Discussion started by: chen.xiao.po
3 Replies
7. Shell Programming and Scripting
I need to find the average from a file like:
data => BW:123 M:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1... (4 Replies)
Discussion started by: Slagle
4 Replies
8. Shell Programming and Scripting
Hi
I have 2 files
file1
aac 23 25
aac 87 90
aac 33 67
file2
23 0.9
24 0.8
25 0.4
........
67 0.55
........
I want to get output as (11 Replies)
Discussion started by: anurupa777
11 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have file like below
111,victor,48,12,36
342,Peter,54,58,30
476,Scott,25,36,48
567,Patty,74,17,95
I have written below code to calcualte avereage for every id
Victor = 48+12+36/3
#!/bin/ksh
/usr/xpg4/bin/awk '
BEGIN {FS=","} {sum=0; n=0;i=3 (1 Reply)
Discussion started by: stew
1 Replies
10. Shell Programming and Scripting
I have some files with the following contents.I would like to calculate average of fifth column. How can I do this with awk?
file1
cat 95.9 152 78.0 17.9
rat 67.1 153 36.5 30.6
dog 81.4 154 68.1 13.3
dog 92.0 155 55.5 36.5
rat 73.8 156 23.9 49.9
file2
rat... (4 Replies)
Discussion started by: avina
4 Replies
LEARN ABOUT DEBIAN
choptest
CHOPTEST(8) System Manager's Manual CHOPTEST(8)
NAME
choptest - HylaFAX page chopping test program
SYNOPSIS
/usr/sbin/choptest [ options ] input.tif
DESCRIPTION
choptest is a program for testing the page chopping support in the HylaFAX software (specifically, in the faxq(8) program). choptest ana-
lyzes a TIFF/F (TIFF Class F) file with 1-D MH- or 2-D MR-encoded data and reports what the automatic page chopping logic would do if the
file were submitted for transmission. Options are provided for controlling whether choptest checks the last page or all pages of the docu-
ment, and what whitespace threshold to use in deciding if a page should be chopped.
OPTIONS
-a Chop all pages in the document. This is equivalent to setting the PageChop configuration parameter to ``all''; c.f. hylafax-
config(5). By default only the last page of the document is considered.
-t inches Set the minimum whitespace threshold that must be present on a page for it to be chopped. This is equivalent to the Page-
ChopThreshold configuration parameter; c.f. hylafax-config(5). By default choptest requires that at least 3 inches of trailing
whitespace be present.
EXAMPLES
The following shows a multi-page, high-resolution document. Each page has insufficient whitespace for it to be chopped.
hyla% ./choptest -a ~/tiff/pics/faxix.tif
Chop pages with >=3" of white space at the bottom.
Don't chop, found 67 rows, need 588 rows
Don't chop, found 67 rows, need 588 rows
Don't chop, found 67 rows, need 588 rows
Don't chop, found 53 rows, need 588 rows
Don't chop, found 91 rows, need 588 rows
Don't chop, found 99 rows, need 588 rows
Don't chop, found 47 rows, need 588 rows
SEE ALSO
faxq(8), hylafax-config(5)
October 3, 1995 CHOPTEST(8)