09-16-2010
thanks a lot, there was in fact a typo in the homework assignment..
10 More Discussions You Might Find Interesting
1. Programming
do any one knows where i can find an implementation in c for the sort function (2 Replies)
Discussion started by: dbargo
2 Replies
2. Shell Programming and Scripting
Hi,
here is my perl script.This script creates an array and is sorting it using the in-built sort function in perl.
#!/usr/local/bin/perl
my number=6;
my @num_arr=(1,2,3,4,5);
my @array=(23,"$number","Hello",2.345,@num_arr);
#printing the array
print... (2 Replies)
Discussion started by: DILEEP410
2 Replies
3. UNIX for Dummies Questions & Answers
Hey guys.
I am trying to sort a file by account number through UNIX. I have a few things but it seems to sort by account number AND sort everything after the account number.
Help please.
Thanks (5 Replies)
Discussion started by: ndoggy020
5 Replies
4. Shell Programming and Scripting
Hi,
I am new to PERL.I want to sort all the lines in a file based on 1,2 and 4th filelds.
Can U suggest me a command/function in perl for this operation.. (5 Replies)
Discussion started by: karthikd214
5 Replies
5. Shell Programming and Scripting
I want to sort unique values of column 2 that has the maximum value at column 7. this is my file and desired output
I have a file like this:
AD008 AD0081010180947 101018 0947 0950 1010180947 1010180950
AD008 AD0081010180947 101018 0947 0956 1010180947 1010180956
AD008 AD0081010180947... (12 Replies)
Discussion started by: aydj
12 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Discussion started by: kowit010
6 Replies
7. Programming
Hi,
Can anyone tell me why the following program is giving compiler error when I use a friend function of a class as the comparison predicate for the third parameter of std::sort() algorithm? How to correct it, keep the 'friend' intact?
#include <iostream>
#include <vector>
#include <list>... (1 Reply)
Discussion started by: royalibrahim
1 Replies
8. Shell Programming and Scripting
Hello there
i have a funny behiavor of the sort fonction, i try it out on different Solaris machine and i have the same issue.
So i would like to see if there is a rationel explanation
here is some data in a file:test.txt
,Test,RSD,RSD_Asset
,Test,RSD,RSD_Credit
,Test,RSD,RSD_Liab... (3 Replies)
Discussion started by: kykyboss
3 Replies
9. UNIX for Dummies Questions & Answers
Hi I have below pattern
A: Apple 2 B:Bolls 4 total_count = 6
A: pens 4 B:Bags 4 total count = 8
A: pens 4 B:Bags 4
A: cells 6
A: jobs 6
Output I need :
A: Apple 2 B:Bolls 4 total_count = 6
A: pens 4 B:Bags 4 total count = 8
A: cells 6
A: jobs 6
... (7 Replies)
Discussion started by: pkkanduk
7 Replies
10. UNIX for Beginners Questions & Answers
Could you please advise on the following: I have two space-delimited files with 9 and 10 columns, respectively, with exactly the same values in column 1. However, the order of column 1 differs between the two files, so I want to sort both files by column 1, so that I can align them and... (6 Replies)
Discussion started by: aberg
6 Replies
LEARN ABOUT OSX
net::ldap::control::sort
Net::LDAP::Control::Sort(3) User Contributed Perl Documentation Net::LDAP::Control::Sort(3)
NAME
Net::LDAP::Control::Sort - Server Side Sort (SSS) control object
SYNOPSIS
use Net::LDAP::Control::Sort;
use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT);
$sort = Net::LDAP::Control::Sort->new(
order => "cn -phone"
);
$mesg = $ldap->search( @args, control => [ $sort ]);
($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT );
print "Results are sorted
" if $resp and !$resp->result;
DESCRIPTION
"Net::LDAP::Control::Sort" is a sub-class of Net::LDAP::Control. It provides a class for manipulating the LDAP Server Side Sort (SSS)
request control 1.2.840.113556.1.4.473 as defined in RFC-2891
If the server supports sorting, then the response from a search operation will include a sort result control. This control is handled by
Net::LDAP::Control::SortResult.
CONSTRUCTOR ARGUMENTS
order
A string which defines how entries may be sorted. It consists of multiple directives, spearated by whitespace. Each directive describes
how to sort entries using a single attribute. If two entries have identical attributes, then the next directive in the list is used.
Each directive specifies a sorting order as follows
-attributeType:orderingRule
The leading "-" is optional, and if present indicates that the sorting order should be reversed. "attributeType" is the attribute name
to sort by. "orderingRule" is optional and indicates the rule to use for the sort and should be valid for the given "attributeType".
Any one attributeType should only appear once in the sorting list.
Examples
"cn" sort by cn using the default ordering rule for the cn attribute
"-cn" sort by cn using the reverse of the default ordering rule
"age cn" sort by age first, then by cn using the default ordering rules
"cn:1.2.3.4" sort by cn using the ordering rule defined as 1.2.3.4
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.
SEE ALSO
Net::LDAP, Net::LDAP::Control::SortResult, Net::LDAP::Control, http://www.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.2 2012-09-20 Net::LDAP::Control::Sort(3)