07-10-2012
You kidding us? Why in the world don't you just try it out?
That's what I do not understand.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file with several columns:
Column1 Column2 Column3. . .Column6
I want to sort the data from Column6. Could I do that through sort even if there are spaces in between fields?
Much thanks!
outta. (3 Replies)
Discussion started by: outtacontrol
3 Replies
2. Shell Programming and Scripting
Hi,
I want a list of entries in 3 space delimited columns. I want to sort entries based on the very first column. Rows can't be changed. For example:
If I have...
Abc Abc Acc
Bca Bda Bdd
Cab Cab Cbc
Dbc Dca Dda
Abc Abc Acc
the output should be...
Abc Abc Acc
Abc Abc Acc
Bca... (7 Replies)
Discussion started by: MobileUser
7 Replies
3. UNIX for Advanced & Expert Users
Hi ,
I need to sort a file based on multiple columns All the columns are of varchar type
can any one give me the command to sort for varchar columns?
Thanks (3 Replies)
Discussion started by: laxmi131
3 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement whereby I have to sort a flat file based on Multiple Columns (similar to ORDER BY Clause of Oracle). I am getting 10 columns in the flat file and I want the file to be sorted on 1st, 3rd, 4th, 7th and 9th columns in ascending order. The flat file is pipe seperated.
Any... (15 Replies)
Discussion started by: dharmesht
15 Replies
5. Shell Programming and Scripting
Hi,
We have a requirement of need to sort a file based on fields 1,3 and 4. I tried with sort command however it is not giving expected output, can we achieve any other way? Please let me know ASAP.
File
a e w a
a b a a
a a d g
a a h h
c d a e
a a a w
Output
a b a a
a a a w
a a d... (4 Replies)
Discussion started by: Nagapandi
4 Replies
6. UNIX for Dummies Questions & Answers
I have a space delimited text file that I would like to sort by multiple columns. First I want to sort by column 1, then by column 2. Both columns are numerical. Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
7. Shell Programming and Scripting
Hello
If you wanted to sort a .csv file that was filled with lines like this:
<Ticker>,<Date as YYYYMMDD>,<Time as H:M:S>,<Volume>,<Corr>
(H : , M, S: )
by date, does anybody know of a better solution than to turn the 3rd and 4th colons of every line into commas, sorting on four keys,... (20 Replies)
Discussion started by: Ryan.
20 Replies
8. UNIX for Dummies Questions & Answers
Hi
I have a text file that has four columns (Logonid,First Name,Last Name,Status)
Logonid First Name Last Name Status
abc2 Fred Mercury Inactive
abc1 John Deacon Active
abc3 Roger Taylor Active
abc4 Brian ... (2 Replies)
Discussion started by: theref
2 Replies
9. Shell Programming and Scripting
Hello!
So ive been presented with this comma-delimited file:
I need a print to look as below
"
lastname, phone_number, zip
for every person with a last name starting with the letter H, I
only with a 650-area code phone number. output should be sorted by reverse ZIP code "
I only have... (5 Replies)
Discussion started by: strangemachine
5 Replies
10. Shell Programming and Scripting
Hi, I have a tab delimited columnar file where I want to remove lines wherever two particular columns match. so for this file, I want to toss the lines where columns 1 and 2 match:
a a 1 3
a b 2 4
b b 3 5
because there are matches column 1 and 2 in lines 1 and 3, I would like a script to... (2 Replies)
Discussion started by: mikey11415
2 Replies
LEARN ABOUT CENTOS
net::ldap::control::sortresult
Net::LDAP::Control::SortResult(3) User Contributed Perl Documentation Net::LDAP::Control::SortResult(3)
NAME
Net::LDAP::Control::SortResult - Server Side Sort (SSS) result control object
SYNOPSIS
use Net::LDAP::Control::Sort;
use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT);
use Net::LDAP::Util qw(ldap_error_name);
$sort = Net::LDAP::Control::Sort->new(
order => "cn -age"
);
$mesg = $ldap->search( @args, control => [ $sort ]);
($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT );
if ($resp) {
if ($resp->result) {
my $attr = $resp->attr;
print "Problem sorting, ",ldap_error_name($resp->result);
print " ($attr)" if $attr;
print "
";
}
else {
print "Results are sorted
";
}
}
else {
print "Server does not support sorting
";
}
DESCRIPTION
"Net::LDAP::Control::SortResult" is a sub-class of Net::LDAP::Control. It provides a class for manipulating the LDAP sort request control
1.2.840.113556.1.4.474 as defined in RFC-2891
A sort result control will be returned by the server in response to a search with a Server Side Sort control. If a sort result control is
not returned then the user may assume that the server does not support sorting and the results are not sorted.
CONSTRUCTOR ARGUMENTS
attr
If "result" indicates that there was a problem with sorting and that problem was due to one of the attributes specified in the sort
control. "attr" is set to the name of the attribute causing the problem.
result
This is the result code that describes if the sort operation was sucessful. If will be one of the result codes describes below.
METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the
current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument.
RESULT CODES
Possible results from a sort request are listed below. See Net::LDAP::Constant for a definition of each.
LDAP_SUCCESS
LDAP_OPERATIONS_ERROR
LDAP_TIMELIMIT_EXCEEDED
LDAP_STRONG_AUTH_REQUIRED
LDAP_ADMIN_LIMIT_EXCEEDED
LDAP_NO_SUCH_ATTRIBUTE
LDAP_INAPPROPRIATE_MATCHING
LDAP_INSUFFICIENT_ACCESS
LDAP_BUSY
LDAP_UNWILLING_TO_PERFORM
LDAP_OTHER
SEE ALSO
Net::LDAP, Net::LDAP::Control::Sort, Net::LDAP::Control, http://ww.ietf.org/rfc/rfc2891.txt
AUTHOR
Graham Barr <gbarr@pobox.com>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 1999-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
perl v5.16.3 2013-06-07 Net::LDAP::Control::SortResult(3)