bash: statistical properties


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting bash: statistical properties
# 1  
Old 10-16-2009
bash: statistical properties

Hi

A bash script, after some operations, return with an array.
My goal is to calculate some statistical properties (hopefully still in bash) of that array, (like mean, variance, max_value and min_value).
For the max, mean and the min it seems work, but for the variance the notation is really 'heavy' and i always get some errors.
Do you know any way to do that using bash?
Thanks

D.
# 2  
Old 10-17-2009

I'd use awk.

You can find scripts for mean, median, mode and standard deviation in my book, Shell Scripting Recipes: A Problem-Solution Approach.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending unix timestamp to every line of a statistical file

I have a statistical file populating every minute as below: 2011-11-11-1108 1955 891 2011-11-11-1109 2270 1049 2011-11-11-1110 1930 904 2011-11-11-1111 2030 931 2011-11-11-1112 1944 900 2011-11-11-1113 1922 875 Instead of having the date and time in the given format (2011-11-11-1113) I... (10 Replies)
Discussion started by: thinktank
10 Replies

2. Infrastructure Monitoring

Send statistical data via SNMP

I am working on a SunOS 5.10 Generic_142900-03 sun4v sparc SUNW,Netra-T2000 With this command: (Unix based cronjob) tail -1 FSC-xxxxxxxxx.stat | nawk -F, '{print $2}' I want to send the numeric output of this command from a statistical file which is updating constantly via SNMPv2 every 1... (4 Replies)
Discussion started by: thinktank
4 Replies

3. UNIX for Dummies Questions & Answers

File properties

Hi , I do have a line in my code as follows: if ] ; then ... else ... fi What does the -z does ? Similarly there is -s in some other part of the code. I guess there are many options like this.. Can anybody please tell what all options are available and what do they mean ? (2 Replies)
Discussion started by: risshanth
2 Replies

4. Shell Programming and Scripting

Array Properties

Hi All, I have a code below but i have problems trying to execute "cat $jpg". Can anybody give me any advise? Is there something wrong with my syntax ? #!/bin/csh set qqq = 123 set www = 456 set jpg = ( $qqq $www ) cat $jpg Output: (2 Replies)
Discussion started by: Raynon
2 Replies

5. UNIX for Dummies Questions & Answers

properties for vi

Hi, I have a simple problem in vi of which I dont know the solution. I have a file of 2000 lines. But when I open the file in vi, it only displays 20 lines and I have to use ctrl-f to see next lines. How do change the screen settings in vi? I want to see screen full text. stty rows... (2 Replies)
Discussion started by: shriashishpatil
2 Replies

6. Shell Programming and Scripting

Getting image properties

How can I get heigth and width of an image file? It's possible to do without ImageMagick or other third libraries?? Thank you very much (3 Replies)
Discussion started by: victorin
3 Replies

7. UNIX for Dummies Questions & Answers

Directory properties

I have set up php shop and it required command line access which i have I executed the install.pl script and everything went OK but when I tried to access the admin foler via the www @ www.helloni.co.uk/shophtml/admin/ i get a forbidden error. I know I have to change the attribs of the folder... (8 Replies)
Discussion started by: trekker
8 Replies
Login or Register to Ask a Question