Hello all, need a little help.
I have an input variable such as ARGV which equals something like
/use/home/name/script/test.dat
I need to be able to get just the "test.dat" (i.e. the file name) at the end of the directory and the directory can be anything and any length. To put it another... (3 Replies)
I have a string of data that looks like this:
private.enterprises.954.1.1.1.1.1.2618 \(OctetString\): U private.enterprises.954.1.1.1.1.2.2618 \(OctetString\): 2618
I am trying to parse the string to only return the values after the ":". Ex from above "U" and "2618".
Any suggestions? (5 Replies)
I want to get filenames from the following input. How can I parse this in bash.
input data
-------------------------------------------------------------------
path=/aaa/bbb/filename1;/aaa/filename2;/aaa/bbb/ccc/ddd/filename3
-------------------------------------------------------------------... (13 Replies)
Hi,
I am wondering if there's a simpler way to extract the second occurrence of a word enclosed in that matches my search criteria.
Sample Input is as follows:
Error installing feature - com.er.nms.cif.ist.NoMatchingUpgra
Error installing feature -... (4 Replies)
Hi Guys,
I spend half a day getting this to work with no luck, perhaps you guys can help..
I have a string from a file looking like this:
module::name=test::type=generic_data::exec=snmpget.......::desc=A Little Test::interval=300
what I would like to split it, so I get a value for each... (3 Replies)
I'm working in korn shell and have a variable which contains a string like:
aa_yyyymmdd_bbb_ccc_ddd.abc. I want to treat the _ and . as delimiters and parse the string so I end up with 6 values in variables that I can manipulate. My original plan was to use
var1=`echo $sting1 | cut -c1-c2` but... (9 Replies)
I've a problem parsing a string as a command:
Consider script stefano.sh as following:
#!/usr/bin/sh
txtshell="./parser.sh /ews/MyEventHandler/data/handler/StopAndMail.php eventid=StopAndMail.MVIN.6300 lot_number=1122FXB facility=EWSF3 'mailto=prova.prova@nohost.com, prova.test@nohost.com'... (2 Replies)
Hi,
I would like to be able to parse out a substring matching a basic pattern, which is a character followed by 3 or 4 digits (for example S1234 out of a larger string). The main string would just be a filename, like Thisis__the FileName_S1234_ToParse.txt. The filename isn't fixed, but the... (2 Replies)
Hi Perl Guys
I have another perl question
I have the following code that i have written
Getopt::Long::config(qw( permute bundling ));
my $OPT = {};
GetOptions($OPT, qw(
ver=s
help|h
)) or die "options parsing failed";
This will allow the user to do something like... (4 Replies)
Discussion started by: ab52
4 Replies
LEARN ABOUT OSX
net::ldap::control::syncrequest
Net::LDAP::Control::SyncRequest(3) User Contributed Perl Documentation Net::LDAP::Control::SyncRequest(3)NAME
Net::LDAP::Control::SyncRequest - LDAPv3 Sync Request control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::SyncRequest;
use Net::LDAP::Constant qw(
LDAP_SYNC_REFRESH_ONLY
LDAP_SYNC_REFRESH_AND_PERSIST
LDAP_SUCCESS );
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$req = Net::LDAP::Control::SyncRequest->new( mode => LDAP_SYNC_REFRESH_ONLY );
my $mesg = $ldap->search(base=> 'dc=mydomain,dc='eg',
scope => 'sub',
control => [ $req ],
callback => &searchCallback, # call for each entry
filter => "(objectClass=*)",
attrs => [ '*']);
sub searchCallback {
my $message = shift;
my $entry = shift;
my @controls = $message->control;
if($controls[0]->isa('Net::LDAP::Control::SyncState')) {
print "Received Sync State Control
";
print $entry->dn()."
";
print 'State: '.$controls[0]->state."
".', entryUUID: '.$controls[0]->entryUUID.', cookie: '.$controls[0]->cookie;
} elsif($controls[0]->isa('Net::LDAP::Control::SyncDone')) {
print "Received Sync Done Control
";
print 'Cookie: '.$controls[0]->cookie.', refreshDeletes: '.$controls[0]->refreshDeletes;
}
}
DESCRIPTION
"Net::LDAP::Control::SyncRequest" provides an interface for the creation and manipulation of objects that represent the "Sync Request
Control" as described by RFC 4533.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
mode
cookie
reloadHint
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::SyncState, Net::LDAP::Control::SyncDone, http://www.ietf.org/rfc/rfc4533.txt
AUTHOR
Mathieu Parent <math.parent@gmail.com>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2008 Mathieu Parent. 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::SyncRequest(3)