![]() |
SortTextFiles.pl - Sort TextFile(s) using values for a column
SortTextFiles.pl TextFile(s)...
SortTextFiles.pl [-d, --detail infolevel] [-h, --help] [--indelim comma | semicolon] [-k, --key colnum | collabel] [--keydata numeric | alphanumeric] [-m, --mode colnum | collabel] [-o, --overwrite] [--outdelim comma | tab | semicolon] [-q, --quote yes | no] [-r, --root rootname] [-s, --sort ascending | descending] [-w, --workingdir dirname] TextFile(s)...
Sort TextFile(s) using values for a key column specified by a column number or label. Only one column key can be specified for sorting. In an event of conflict during sorting process, two similar values for a column key are simply transferred to output files in order of their presence in input files. Additionally, rows with empty or inappropriate values for column key are simply placed at the end. The file names are separated by space. The valid file extensions are .csv and .tsv for comma/semicolon and tab delimited text files respectively. All other file names are ignored. All the text files in a current directory can be specified by *.csv, *.tsv, or the current directory name. The --indelim option determines the format of TextFile(s). Any file which doesn't correspond to the format indicated by --indelim option is ignored.
To perform numerical sort in ascending order using first column values and generate a new CSV text file NewSample1.csv, type:
To perform numerical sort in descending order using MolWeight column and generate a new CSV text file NewSample1.csv, type:
To perform numerical sort in ascending order using column number 1 and generate a new TSV text file NewSample1.csv, type:
JoinTextFiles.pl, MergeTextFilesWithSD.pl, ModifyTextFilesFormat.pl, SplitTextFiles.pl, TextFilesToHTML.pl
Copyright (C) 2004-2008 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.