Hi,
I want to bundle if statements
The script which i created is
if ]; then
if ]; then
now=`TZ=CST+24 date +%Y-%m-%d`
nows=`TZ=CST+24 date +%Y-%m-%d` ;
else ]; then
now=`TZ=CST+48 date +%Y-%m-%d`
nows=`TZ=CST+48 date +%Y-%m-%d` ;
fi
now=`TZ=CST+24 date +%Y-%m-%d`
nows=`date... (2 Replies)
Dear friends,
I am trying to prepare a shell script which do the following task. Being a beginner in scripting I need a bit of help from you all for shell script which does the following job.
1.Check for existence of a file in a shared directory (at some remote location ) once in a day ... (1 Reply)
Hi
I have a script that carries out a "grep" command, and displays the output on screen.
What I need to do is utilise the exit status of this grep, so that, for example, if it returns no entries, it asks the user if they want to set up a new user, and if the grep returns an entry, it states... (1 Reply)
Hi Guys,
I have one requirement like if we run install.sh file it should have to create a zone and install oracle in that zone with out any user interaction. So the complete code should be automated.
Almost 90% of the code I completed but i am having some doubts
1) After the zone creation... (1 Reply)
Hi
I am new to PHP.
I have to changed a website design adn add certain features and lnks which shuld direct it towards other website.
Can any body help me how to proceed. I have some already made templates to do this. I am conpletely new..
So, I have to first install Php from... (0 Replies)
I'm writing a small socket program (UDP) to communicate between two servers.
Problem is, I dont know how to implement time out hence my script keeps on waiting for the peer response.
#!/usr/bin/bash
use IO::Socket::INET;
$|=1;
$socket=new IO::Socket::INET->new(LocalPort=>5001,
... (2 Replies)
Hi there,
Say I have a list of IPs, I am running scripts on them. If the process hang.
I want to continue with the rest of the IPs.
10.11.1.1
10.11.1.2
10.11.1.3
10.11.1.4
10.11.1.5
10.11.1.6 <-- Process Hangs here
10.11.1.7
10.11.1.8
10.11.1.9
10.11.1.10
10.11.1.11
10.11.1.12
... (11 Replies)
Discussion started by: alvinoo
11 Replies
LEARN ABOUT CENTOS
net::ldap::control::paged
Net::LDAP::Control::Paged(3) User Contributed Perl Documentation Net::LDAP::Control::Paged(3)NAME
Net::LDAP::Control::Paged - LDAPv3 Paged results control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::Paged;
use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED );
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$page = Net::LDAP::Control::Paged->new( size => 100 );
@args = ( base => "cn=subnets,cn=sites,cn=configuration,$BASE_DN",
scope => "subtree",
filter => "(objectClass=subnet)",
callback => &process_entry, # Call this sub for each entry
control => [ $page ],
);
my $cookie;
while (1) {
# Perform search
my $mesg = $ldap->search( @args );
# Only continue on LDAP_SUCCESS
$mesg->code and last;
# Get cookie from paged control
my($resp) = $mesg->control( LDAP_CONTROL_PAGED ) or last;
$cookie = $resp->cookie or last;
# Set cookie in paged control
$page->cookie($cookie);
}
if ($cookie) {
# We had an abnormal exit, so let the server know we do not want any more
$page->cookie($cookie);
$page->size(0);
$ldap->search( @args );
}
DESCRIPTION
"Net::LDAP::Control::Paged" provides an interface for the creation and manipulation of objects that represent the "pagedResultsControl" as
described by RFC 2696.
The control is allowed on LDAP search requests ("search" in Net::LDAP) only. On other operations it will - depending on the value of the
parameter "critical" - either be ignored or lead to errors.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
cookie
The value to use as the cookie. This is not normally set when an object is created, but is set from the cookie value returned by the
server. This associates a search with a previous search, so the server knows to return the page of entries following the entries it
returned the previous time.
size
The page size that is required. This is the maximum number of entries that the server will return to the search request.
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, http://www.ietf.org/rfc/rfc2696.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) 2000-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::Paged(3)