Hi All,
Can anyone tell me how to sort data in a file using the “sort” command? Note that the records in the data file are not separated into fields. I know only the column positions of the data on which sorting should be done. For example say I've to sort based on the data present in between... (1 Reply)
Hi,
I need to sort the 3rd column in ascending order , each and every column are seperated by ~.
sample input file :
2~Lead Time Metrics~jennife1
2~Lead Time Metrics~mmullis
2~Lead Time Metrics~lisah
2~Lead Time Metrics~pros
2~Lead Time Metrics~kenward
can any one help me out .
i... (1 Reply)
I have a file abc.txt which contains data in th following format
abc,23
hgfh,87
tweg,89
jdfjn,74
I want to sort on the basis of column (the second one). It should be numerical sort.
output should be
abc,23
jdfjn,74
hgfh,87
tweg,89
I know how to do it in unix. I need a PERL code (1 Reply)
Hello all,
Is there a way to sort only one column while keeping everything else intact. Take for example this situation: (all columns are space separated)
11 AA asdf 1 -0.5 xx
11 AA axdf 1 -0.6 xx
11 AA csls 1 -0.7 xx
11 AA hjkj 1 -0.4 xx
11 AA uius 1 -0.8 xx
22 AA asdf 1 -0.4 xx
22 AA... (7 Replies)
Hello,
I have two files as the following:
File1:
F0100020 A G
F0100030 A T
F0100040 A G
File2:
F0100040 A G BTA-28763-no-rs 77.2692
F0100030 A T BTA-29334-no-rs 11.4989
F0100020 A G BTA-29515-no-rs 127.006
I want to sort the second file based on the... (6 Replies)
hello,
I have a file as follows:
F0100010 A C F0100040 A G BTA-28763-no-rs 77.2692
F0100020 A G F0100030 A T BTA-29334-no-rs 11.4989
F0100030 A T F0100020 A G BTA-29515-no-rs 127.006
F0100040 A G F0100010 A C BTA-29644-no-rs 7.29827
F0100050 A... (9 Replies)
I am trying to arrange these columns so that they look like this:
Xray2_1255555 Number of Copies: 1
Boxcar_1387305895 Number of Copies: 2
Fox_1387305896 Number of Copies: 2
But I have one column after another like this:
Xray2_1255555
Number of Copies: 1
Xray2_12444444
Number of... (5 Replies)
Dear All,
I have a set of columns (usually unknown number) and I would like to sort each of them (descending values) but my columns are independent. Can you please help me
file1
1,5,7
3,4,9
2,6,8
outcome should be
1,4,7
2,5,8
3,6,9
I have tried
sort -n -k1,1 -k2,2 -k3,3
but this... (8 Replies)
I am trying to sort, do uniq by 1st column and report this 4 columns tab delimiter table , eg
chr10:112174128 rs2255141 2E-10 Cholesterol, total
chr10:112174128 rs2255141 7E-16 LDL
chr10:17218291 rs10904908 3E-11 HDL Cholesterol
chr10:17218291 rs970548 8E-9 TG... (4 Replies)
What im trying to do is sort the output by the number on the second column and than limit the result to only the first three lines.
This is the code
idlist="x23s52; f34233; 2343xs; 25x34; si342d"
cntr=1
idcnt=$(print $nidlist |tr ';' '\n' |wc -l)
numofgrps=0
while (($cntr <= $idcnt))... (3 Replies)
Discussion started by: ajetangay
3 Replies
LEARN ABOUT OSX
locale::codes::langfam
Locale::Codes::LangFam(3pm) Perl Programmers Reference Guide Locale::Codes::LangFam(3pm)NAME
Locale::Codes::LangFam - standard codes for language extension identification
SYNOPSIS
use Locale::Codes::LangFam;
$lext = code2langfam('apa'); # $lext gets 'Apache languages'
$code = langfam2code('Apache languages'); # $code gets 'apa'
@codes = all_langfam_codes();
@names = all_langfam_names();
DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in
ISO 639-5.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5
language family codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a
constant that is automatically exported by this module.
For example, the two are equivalent:
$lext = code2langfam('apa','alpha');
$lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA);
The codesets currently supported are:
alpha
This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages.
This is the default code set.
ROUTINES
code2langfam ( CODE [,CODESET] )
langfam2code ( NAME [,CODESET] )
langfam_code2code ( CODE ,CODESET ,CODESET2 )
all_langfam_codes ( [CODESET] )
all_langfam_names ( [CODESET] )
Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] )
Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] )
Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME )
Locale::Codes::LangFam::delete_langfam_alias ( NAME )
Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] )
These routines are all documented in the Locale::Codes::API man page.
SEE ALSO
Locale::Codes
The Locale-Codes distribution.
Locale::Codes::API
The list of functions supported by this module.
http://www.loc.gov/standards/iso639-5/id.php
ISO 639-5 .
AUTHOR
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
COPYRIGHT
Copyright (c) 2011-2012 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.2 2012-10-11 Locale::Codes::LangFam(3pm)