Welcome to the forum. In the future please surround data with code tags so that we can read them easily, and do the same for scripts.
I added a few extra lines to exercise the sorting of fields. This script uses commands often found on *nix. The standard sort has an option for named months:
Producing:
I like your music, I hope you like my opus s1 . See man pages for details ... cheers, drl
i want sort columns with headers based on another file headers
file1
eg: i'm having an empty file with only coumn names like
lastname firstname title expirydate stlcno status etc...
another file with same column names and some other as well but in different order...
file2
eg:firstname... (2 Replies)
Hi ,
I have a dump of .csv files in a folder, I need to sort all files by the first 3 columns and merge them all in one big csv file.
I am using a cat command to join them, but how can i sort before appending all the files as one big file,
Regards,
Shruthi (4 Replies)
Hello,
I am facing the following problem:
I have a file in csv format. So several records where data fields are separated by comma ','
The lenght of the fields is variable, as well as the number of fields per record. But there are at least 7 fields per record.
I need to sort the file based... (1 Reply)
I have the following csv data that I would like to sort on the 4th field by date
from oldest to newest.
data:
,,,02/06/2012,Carry H,Add,Add,Sys_RTH,111.222.333.777
4/7/12,,,03/03/2013,Parry H,Add,Add,Sys_RTH,111.222.333.776
,,,12/06/2012,Harry H,Add,Add,Sys_RTH,111.222.333.778... (3 Replies)
hello, I have a large file (about 1gb) that is in a file similar to the following:
I want to make it so that I can put all the duplicates where column 3 (delimited by the commas) are shown on top. Meaning all people with the same age are listed at the top.
The command I used was ... (3 Replies)
I have a CSV with below values
name,city,2,country
name,city,15,country
abc,wq,10,afdfd,
qeqe,ewqre,1,wqew
I need to sort them in ascending order based on the value of column 3 and then , pick the rows with values less than 10 and be able to display the columns in that row. Can anyone... (11 Replies)
I have to sort the 4th column of an excel/csv file. I tried the following command
sort -u --field-separator=, --numeric-sort -k 2 -n dinesh.csv > test.csv
But, it's not working. Moreover, I have to do the same for more than 30 excel/csv file. So please help me to do the same. (6 Replies)
I have a csv file as shown below,
xop_thy 80 avr_njk 50 str_nyu 60
avr_irt 70 str_nhj 60 avr_ngt 50
str_tgt 80 xop_nmg 50 xop_nth 40
cyv_gty 40 cop_thl 40 vir_tyk 80
vir_plo 20 vir_thk 40 ijk_yuc 70
cop_thy 70 ijk_yuc 80 irt_hgt 80
I need to align/sort the csv file based... (7 Replies)
Discussion started by: dineshkumarsrk
7 Replies
LEARN ABOUT DEBIAN
amc-export
AMC-EXPORT(1) Auto Multiple Choice AMC-EXPORT(1)NAME
AMC-export - exports marks for AMC multiple choice exams.
SYNOPSIS
auto-multiple-choice export --data project-data-dir --module module --fich-noms students-list.csv [--noms-encodage list-encoding]
--o output-file
DESCRIPTION
The AMC-export.pl command exports marks from an Auto Multiple Choice exam.
--data project-data-dir
gives the directory where data files are (see for example AMC-prepare(1)).
--module module
selects a module for export. See below for the modules included in the AMC standard distribution.
--fich-noms students-list.csv
sets the students list file.
--noms-encodage list-encoding
selects an encoding for file students-list.csv (default is utf-8).
--o output-file
gives the output file name.
--option-out options
gives an option for selected module, in the form key=value (see below for possible options for each module). To specify multiple
options, use --option several times.
--sort sort-type
sort the students names, depending on sort-type. If sort-type is l, use line number from students list file to sort. If sort-type is m,
use mark (and name if marks are equal) to sort. If sort-type is i, use student number to sort. If sort-type is n, use name to sort (or
line from students list if equal).
--useall all
if all is 0 or empty, only students with a scaned answer sheet appears in the output. If all is 1, all students in the students list
appears in the output.
MODULES
OpenDocument
With "--module ods", an OpenDocument (for use by OpenOffice or LibreOffice for example) is produced. The following options are recognized:
nom
gives a name for the exam, to be written on the beginning of the sheet.
code
gives an short name for the exam, to be used as a tab name.
columns
sets the list of columns that are to be added to each student. Default value is student.key,student.name.
stats
with a true value, a table will be added with statistics for all questions.
statsindic
with a true value, a table will be added with statistics for all indicative questions.
CSV
With "--module CSV", a CSV file is produced. The following options are recognized:
columns
sets the list of columns that are to be added to each student. Default value is student.copy,student.key,student.name.
decimal
sets the decimal point (default is a dot).
encodage
sets the encoding to use for output (default is utf-8).
separateur
sets the character used between colums (default is a comma).
entoure
sets the character used to enclose strings (default is a double quote).
ticked
if not empty, additional columns (with "CHECKED:" prefix) are included to give all the checked boxes on all the sheets. This can be
used by an external program to retrieve all the checked boxes when marks are not sufficient. Use value 01 to get 0;0;1;1;0 if boxes 3
and 4 are checked, and value AB to get CD if boxes 3 and 4 are checked.
List
With "--module List", a PDF file is produced with a list of marks for all students. The following options are recognized:
pagesize
The page size. Default value is a4.
nom
gives the name of the exam, to be printed at the top of the page.
ncols
The number of columns. Default value is 2.
decimal
sets the decimal point (default is a dot).
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-EXPORT(1)