Help with calculate total sum of same data problem
Long list of input file:
Desired output file:
I would like to total up all the figure in column 2 if they share the same data in column 1.
Input file might up to few MB.
Thanks for any advice.
Hi, i have a file which content the following:
>cat cols
data a:23:data
data b:76:data
data c:-30:data
i would like to sum up the value of column 2, but the result that return to me is 0. Can anyone help?
i'm using this code to do the sum
awk -F" " 'BEGIN {x=0} {x+=$2} END {print... (5 Replies)
The file content is dynamic and using this format:
name1 number1
name2 number2
name3 number3
name4 number4
....................
Need a smooth way to calculate the sum of all the numbers in that file (number1 + number2 + number3 + number4........ = total ) (11 Replies)
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Hi,
Just wondering, is there anyway I can get the total of logs generated by hours ? Let say I have these logs,
Sep 23 04:48:43 hsbcufs: NOTICE: realloccg /: file system full
Sep 23 04:48:47 hsbcufs: NOTICE: alloc: /: file system full
Sep 23 04:48:51 hsbcufs: NOTICE: realloccg /: file... (14 Replies)
HI
I have a file
# cat marks.txt
MARKS LIST
2013
Name english french chinese latin total_marks
wer 34 45 67 23
wqa 12 39 10 56
wsy 23 90 23 78
Now i need to find the total marks of each student using... (11 Replies)
Hi All ,
I have the following script as below , I tried to modify to meet the requirement , could someone help ? very thanks
================================================================================================
while read STR NAME; do
Total=0
MyString="$STR"
GetData () {... (18 Replies)
Hi
I am having a set of files which will have the card details and the amount that was spending on the card. Each file will have the set of cards and dollar amount spend on it. I am trying to sum the dollar values by card number on each files. Is there a way I do it all in all one steps
File... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
LEARN ABOUT DEBIAN
ocamlwc
OCAMLWC(1) General Commands Manual OCAMLWC(1)NAME
ocamlwc - count the lines of code and comments in OCaml sources
SYNOPSIS
ocamlwc [options] [files]
DESCRIPTION
ocamlwc is a program to count the number of lines of code and documentation in OCaml sources. It assumes its input to be lexically well-
formed. If no files are given, then ocamlwc reads from stdin.
The first column of the output lists the number of source lines of code, the second column the number of lines of documentation, and the
third the respective filename. If ocamlwc acts on more than one file, then it prints a total in the last line.
OPTIONS -p Print percentage of documentation (in an additional column after the filename).
-c Print only the code size, i.e., omit the documentation column.
-e (everything) Do not skip headers. A header is the first comment in a file.
-a (all) Do not skip generated files. foo.ml is a generated file if one of foo.mll, foo.mly, or foo.ml4 is amongst the given files.
foo.mli is a generated file if foo.mly is amongst the given files.
-h Print short usage information.
AUTHOR
ocamlwc was written by Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>.
This manual page was written by Georg Neis <gn@oglaroon.de>.
January 2, 2007 OCAMLWC(1)