file format is
word filename no.of occurances
------------------------------
wish f3.txt 2
wish f2.txt 1
cold f1.txt 5
cold f2.txt 3
cold f1.txt 3
cold e.txt 3
gold f1.txt 7
gold f3.txt 3
rush e.txt 2
itz abt building a search index for every word in the files given as input
the... (1 Reply)
hey mate. ive got a sorting problem that i would like to share...
i made a script that sorts the bdf command and redirected the output to a file. the output of the file is:
691416 34% /
851552 7% /stand
7203048 31% /var
23637584 26% /var/adm/crash
2968864 ... (4 Replies)
Hai ,
In unix we are going to sort it out all the directories and files based on size of the file. For that we have to use this command ls -al | sort
+4nr. If we are giving this command means it will show all the records in a descending order....when I am checking one file bytes its... (4 Replies)
Hi,
Can someone tell me why the "LargeFile" is coming first before the smaller files. Is there any way to list the files based on size column.
ls -g| sort -k 4
-rw-r--r-- 1 user 6117910528 Apr 28 15:04 LargeFile
-rw-r--r-- 1 user 6136832 May 30 07:23 my_20080530.tar
-rw-r--r-- ... (2 Replies)
Hi all! I am new to Unix programming so bare with me please :).
I have saved the output of my results in a file called testfile which contains 3 columns a 15 rows.
e.g.
175 754 abvd
948 454 fewf
43 754 fewc
6 734 feww
xxx xxx xxxx I want to sort the contents of this file... (10 Replies)
1) I need to reverse sort the text from lit.csv (bellow) by the second column, then save the last five lines in a text file text.txt but I'm doing something wrong so any help would be much appreciated.
I've been trying to use this: sort --field-separator=; -b -k2g,2 lit.csv -o text.txt
2)... (4 Replies)
I have data like this in file
Now I have to sort using second column(usage) and i should get first column against it post sorting
please provide input (2 Replies)
Hi,
I have the following list:
42A
42AA
42B
42BB
42AAA
42BBB
49A
49AA
49B
49AAA
49BB
I need it to be sorted as following:
42A
42B (2 Replies)
Discussion started by: sairamtejaswi
2 Replies
LEARN ABOUT DEBIAN
net::ldap::control::sortresult
Net::LDAP::Control::SortResult(3pm) User Contributed Perl Documentation Net::LDAP::Control::SortResult(3pm)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.14.2 2012-01-29 Net::LDAP::Control::SortResult(3pm)