Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Hi,
I am unable sum of each column in the loop usng awk command.
Awk is not allowing the parameters in the command.
i am facing the below error.
awk: 0602-562 Field $() is not correct.
Source file
abc.txt
100,200,300,400,500,600,700,800,900
101,201,301,401,501,601,701,801,901
... (1 Reply)
I am trying to get the sum of the first column of a file. When I use the same method for other files it works just fine... for some reason for the file below it gives me an error that I don't understand... I tried looking at different lines of the file and tried different things, but I still... (7 Replies)
// AIX 5.3 & AIX 6.1
ls -al |awk '{print $5}'
This gives each file's size in byte.
I need to get:
- the sum of all files in Giga bytes with loop.
- excluding the size of directories (ls -al returns the size of directories).
There are hundreds and thousands of files, so summing up... (8 Replies)
Coins.txt:
gold 1 1986 USA American Eagle
gold 1 1908 Austria-Hungary Franz Josef 100 Korona
silver 10 1981 USA ingot
gold 1 1984 Switzerland ingot
gold 1 1979 RSA Krugerrand
gold 0.5 1981 RSA Krugerrand
gold 0.1 1986 PRC Panda
silver 1 1986 USA Liberty dollar
gold 0.25 1986 USA Liberty... (2 Replies)
Hi
I have attached txt file as input,
and i'm able to calculate sum of columns at the end but the format of sum is not coming up right.
awk -F"," '{for (i=4;i<=NF;i++) sum+=$i}{print}; END { sum="Total:"; for (i=1;i<=NF;i++) {printf sum ","} print "\n"}' input.txt
check the o/p file, at... (6 Replies)
Hi,
I have an awk command that I am using, and part of it sums COL_9 however when I read the output it is not including decimal places;
awk '
BEGIN{FS=OFS=","}
NR==1{print;next}
{a+=$9
c = $12
d = $18
}
END{for(i in a) {split(i,b,";"); print $1, $2, $3, b, $5, $6, b, b, a, $10, $11,... (1 Reply)
Discussion started by: Ads89
1 Replies
LEARN ABOUT DEBIAN
amc-regroupe
AMC-REGROUPE(1) Auto Multiple Choice AMC-REGROUPE(1)NAME
AMC-regroupe - merge JPEG annotated AMC multiple choice answer sheets to get a PDF file per student.
SYNOPSIS
auto-multiple-choice regroupe --projet project-dir --sujet subject.pdf --modele file-name-model --fich-noms students-list.csv
[--noms-encodage encoding] [--compose]
DESCRIPTION
The command AMC-regroupe.pl merges annotated AMC multiple choice answer sheets (there is one per page) to get a single PDF file per
student.
--data data-dir
gives the directory where data files are (see for example AMC-meptex(1)).
--projet project-dir
Gives the project directory.
--sujet subject.pdf
gives the subject file (as prepared by AMC-prepare(1)). This helps in getting the page size for the subject to make annotated PDF fit
this size.
--fich-noms students-list.csv
sets the students list file name.
--noms-encodage encoding
selects an encoding for file students-list.csv (default is utf-8).
--modele file-name-model
sets a file name model for annotated PDFs. In this model, some sequences will be substituted:
(N)
is replaced by the student's name.
(ID)
is replaced by the student number.
(COL)
is replaced by the value of column COL in the students list for the curent student.
The default value is '(N)-(ID).pdf'.
--compose
When using this option, pages for which there is no scan will be replaced by the corresponding page from the corrected answer sheet.
This option is for example useful when using the separate answer sheet layout: in this case, the annotated answer sheet will not be
readable without the pages with the questions.
When using the --compose option, one must also use the --tex-src (and optionnaly --with, --filter and --filtered-source) option.
--tex-src mcq-source-file
gives the source file for the subject.
--with latex-engine
gives the LaTeX engine (command) to be used to process the (optionaly filtered) source file. latex-engine can be pdflatex or xelatex
for exemple.
--filter filter
sets the filter name to transform the MCQ source file into a LaTeX file (see AMC-prepare(1)).
--filtered-source mcq-latex-file
gives the LaTeX file to make from the source file using specified filter (see AMC-prepare(1)).
--debug file.log
gives a file to fill with debugging information.
AUTHORS
Alexis Bienvenue <paamc@passoire.fr>
Main author
Jean Berard
Translation from French
Georges Khaznadar
Translation from French
COPYRIGHT
Copyright (C) 2008-2012 Alexis Bienvenue
This document can be used according to the terms of the GNU General Public License, version 2 or later.
Auto Multiple Choice 1.1.1 06/19/2012 AMC-REGROUPE(1)