In VI editor ctrl + g is used indicate the line number on which the cursor is placed...similarly is there a way to determine the column number of the cursor position..? (1 Reply)
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)
Hi. How do I find an expression with awk in only one column, and if it fits, then print that whole column.
1 apple oranges
2 bannanas pears
3 cats dogs
4 hesaid shesaid
echo "which number:"
read NUMBER (user inputs number 2 for this example)
awk " /$NUMBER/ {field to search is field... (2 Replies)
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Input file :
5 20
500 2
20 41
41 0
23 1
Desired output :
5
2
20
0
1
By comparing column 1 and 2 in each line, I hope can print out the column with smallest number.
I did try the following code, but it don't look good :( (2 Replies)
Example:
I have files in below format
file 1:
zxc,133,joe@example.com
cst,222,xyz@example1.com
File 2 Contains:
hxd
hcd
jws
zxc
cst
File 1 has 50000 lines and file 2 has around 30000 lines :
Expected Output has to be :
hxd
hcd
jws (5 Replies)
Discussion started by: TestPractice
5 Replies
LEARN ABOUT CENTOS
net::ldap::control::persistentsearch
Net::LDAP::Control::PersistentSearch(3) User Contributed Perl Documentation Net::LDAP::Control::PersistentSearch(3)NAME
Net::LDAP::Control::PersistentSearch - LDAPv3 Persistent Search control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PersistentSearch;
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$persist = Net::LDAP::Control::PersistentSearch->new( changeTypes => 15,
changesOnly => 1,
returnECs => 1 );
$srch = $ldap->search( base => "cn=People,dc=mydomain,dc=eg",
filter => "(objectClass=person)",
callback => &process_entry, # call for each entry
control => [ $persist ] );
die "error: ",$srch->code(),": ",$srch->error() if ($srch->code());
sub process_entry {
my $message = shift;
my $entry = shift;
print $entry->dn()."
";
# reduce memory usage
$message->pop_entry();
}
DESCRIPTION
"Net::LDAP::Control::PersistentSearch" provides an interface for the creation and manipulation of objects that represent the
"PersistentSearch" control as described by draft-smith-psearch-ldap-03.txt.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
changeTypes
An integer value determining the types of changes to look out for. It is the bitwise OR of the following values (which represent the
LDAP operations indicated next to them):
1 = add
2 = delete
4 = modify
8 = modDN
If it is not given it defaults to 15 meaning all changes.
changesOnly
A boolean value telling whether the server may return entries that match the search criteria.
If "TRUE" the server must not return return any existing entries that match the search criteria. Entries are only returned when they
are changed (added, modified, deleted, or subject to a modifyDN operation)
returnECs
If "TRUE", the server must return an Entry Change Notification control with each entry returned as the result of changes.
See Net::LDAP::Control::EntryChange for details.
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, Net::LDAP::Control::EntryChange
AUTHOR
Peter Marschall <peter@adpm.de>, based on Net::LDAP::Control::Page from Graham Barr <gbarr@pobox.com> and the preparatory work of Don
Miller <donm@uidaho.edu>.
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2004 Peter Marschall. 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::PersistentSearch(3)