Assuming that the first column is ALWAYS "chr" followed by the chromosome number and that you want to perform a numeric sort on the chromosome number rather than an alphanumeric sort on the entire 1st field:
Hello. I've read a few threads on how to sort on multiple fields, but I still can't get my file to sort correctly.
I have a comma delimited .csv file will over a hundred fields. I want to sort it by field 2, field 62 and then field 61 (integer fields).
input looks like this well swap field... (2 Replies)
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Experts, how to sort this fields with numerical order :
-How to use the sort command in this case, I was thinking with -k but it is not working,
lan5000
lan5000:1
lan5000:10
lan5000:11
lan5000:12
lan5000:13
lan5000:14
lan5000:15
lan5000:16
lan5000:17 ... (6 Replies)
Hi,
I would like to sort a list in different ways:
1> Unique based on Field 1 with highest Field 4
For Instance Input:
1678923450;11112222333344;11-1x;2_File.xml
1678923450;11112222333344;11-1x;5_File.xml
1234567890;11113333222244;11-1x;3_File.xml
Output:
... (7 Replies)
I have a csv dump from sql server that needs to be converted so it can be feed to another program. I already sorted on field 1 but there are multiple columns with same field 1 where it needs to be compared against and if it is same then append field 5.
i.e from
ANG SJ,0,B,LC22,LC22(0)
BAT... (2 Replies)
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt
set feedback off
set heading off
select 114032 as c_1 from dual ;
EOF
for i in `cat sql_1.txt`
do
sh script_1.sh $i
Currently i am passing one column value to the single unix variable.
How can i pass the values from 2... (2 Replies)
New to unix.
I need to sort the records of a file by a control number field. That field is in POS 16 through 28. How do I do that? There are no delimiters, or spaces to separate fields.
See example below. Each line is a record.
REC1CCYYMMDD0018888888888888ABCDE... (1 Reply)
Hi All,
I have one requirement, where I need to have output of ls -l command sorted on 1) first on filename 2) last modified time ( descending ) - latest change first.
I am not able to figure out how to do it..
Also I dont have a way to change Date display for ls -ltr command..
I am... (5 Replies)
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
LEARN ABOUT HPUX
slapo-valsort
SLAPO-VALSORT(5) File Formats Manual SLAPO-VALSORT(5)NAME
slapo-valsort - Value Sorting overlay to slapd
SYNOPSIS
/etc/ldap/slapd.conf
DESCRIPTION
The Value Sorting overlay can be used with a backend database to sort the values of specific multi-valued attributes within a subtree. The
sorting occurs whenever the attributes are returned in a search response.
Sorting can be specified in ascending or descending order, using either numeric or alphanumeric sort methods. Additionally, a "weighted"
sort can be specified, which uses a numeric weight prepended to the attribute values. The weighted sort is always performed in ascending
order, but may be combined with the other methods for values that all have equal weights. The weight is specified by prepending an integer
weight {<weight>} in front of each value of the attribute for which weighted sorting is desired. This weighting factor is stripped off and
never returned in search results.
CONFIGURATION
These slapd.conf options apply to the Value Sorting overlay. They should appear after the overlay directive.
valsort-attr <attribute> <baseDN> (<sort-method> | weighted [<sort-method>])
Configure a sorting method for the specified attribute in the subtree rooted at baseDN. The sort-method may be one of alpha-ascend,
alpha-descend, numeric-ascend, or numeric-descend. If the special weighted method is specified, a secondary sort-method may also be
specified. It is an error to specify an alphanumeric sort-method for an attribute with Integer or NumericString syntax, and it is an
error to specify a numeric sort-method for an attribute with a syntax other than Integer or NumericString.
EXAMPLES
database bdb
suffix dc=example,dc=com
...
overlay valsort
valsort-attr member ou=groups,dc=example,dc=com alpha-ascend
FILES
/etc/ldap/slapd.conf
default slapd configuration file
SEE ALSO slapd.conf(5), slapd-config(5).
ACKNOWLEDGEMENTS
This module was written in 2005 by Howard Chu of Symas Corporation. The work was sponsored by Stanford University.
OpenLDAP 2012/04/23 SLAPO-VALSORT(5)