If I have a file like this, could anyone please guide me how to find the average value in each metrix. The file has got about 130,000 metrixs.
Grid-ref= 142, 235
178 182 203 240 273 295 289 293 283 262 201 176
167 187 187 246 260 282 299 312 293 276 230 191
169 ... (2 Replies)
Hi,
I have the data like this
$1 $2
1 12
2 13
3 14
4 12
5 12
6 12
7 13
8 14
9 12
10 12
i want to compute average of $1 and $2 every 5th line (1-5 and 6-10)
Please help me with awk
Thank you (4 Replies)
Hi
I am looking for an awk script which can compute average of all the fields every 5th line. The file looks:
A B C D E F G H I J K L M
1 18 13 14 12 14 13 11 12 12 15 15 15
2 17 17 13 13 13 12 12 11 12 14 15 14
3 16 16 12 12 12 11 11 12 11 16 14 13
4 15 15 11 11 11 12 11 12 11... (6 Replies)
I have a file which is
2
3
4
5
6
6
so i am writing program in C to calculate mean..
#include<stdio.h>
#include<string.h>
#include <math.h>
double CALL mean(int n , double x)
main (int argc, char **argv)
{
char Buf,SEQ;
int i;
double result = 0;
FILE *fp; (3 Replies)
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
I have the following Snps data
CHROM POS ID
chr7 78599583 rs987435
chr15 33395779 rs987436
chr1 189807684 rs987437
chr20 33907909 rs987438
chr12 75664046 rs987439
and the following gene data
genename name chrom strand txstart txend... (8 Replies)
i have a file with 2 columns. i want to calculate the average of column 1 based on the values of column 2. here's how the file looks like. i want to calculate the sums of numbers corresponding to 1 and then calculate the average. same for numbers corresponding to zero. any help with a code would... (1 Reply)
Discussion started by: onerokeyz
1 Replies
LEARN ABOUT REDHAT
ansi2knr
ANSI2KNR(1) General Commands Manual ANSI2KNR(1)NAME
ansi2knr - convert ANSI C to Kernighan & Ritchie C
SYNOPSIS
ansi2knr [--filename filename] [input_file [output_file]]
DESCRIPTION --filename provides the file name for the #line directive in the output, overriding input_file (if present).
If no input_file is supplied, input is read from stdin.
If no output_file is supplied, output goes to stdout.
There are no error messages.
ansi2knr recognizes function definitions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a
right parenthesis as the last character on the line, and with a left brace as the first token on the following line (ignoring possible
intervening comments). It will recognize a multi-line header provided that no intervening line ends with a left or right brace or a semi-
colon. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line.
ansi2knr also recognizes adjacent string literals and concatenates them.
The following constructs will confuse it:
- Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call).
- Some macros that tinker with the syntax of the function header.
- String literals whose concatenation requires rewriting their contents; e.g. "ab " "07c" is concatenated to "ab 07c", which is not
correct.
The --varargs switch is obsolete, and is recognized only for backwards compatibility. The present version of ansi2knr will always attempt
to convert a ... argument to va_alist and va_dcl.
AUTHOR
L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and continues to maintain the current version; most of the code in the
current version is his work. ansi2knr also includes contributions by Francois Pinard <pinard@iro.umontreal.ca>, Jim Avera <jima@net-
com.com>, and Paul Eggert <eggert@twinsun.com>.
8 March 2000 ANSI2KNR(1)