That for the state assignment...
What's regarding the output, printf kann handle format strings as described in the manpage: man 3 printf.
Example
Description
Output String variable $service_name with minimum length 20 chars - aligned left - then space then : then space then variable $service_state with minimum length 20 chars - aligned left and then new line.
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)
hi All,
I have the following two requirements:
case 1:
In a file i have the below code:
if ((a>b)) a=b;
else a = c;
by using some means i need to convert the line to the following output:
Output required:
case 2:
In a file i have the below code:
if (a>b)
a=b;
else
a... (4 Replies)
I have a file (file1) with in the below format
ST*820*212121
BPR*C*213212.20*C*212*CCD*01***01*071000013*DA*321321*101208
TRN*1*21321321*13213
N1*PR*3232. dff. SYS.*91*3232
ENT*1
N1*PE* 2132121321
RMR*TN*234456677888**192387.20*192387.20
REF*IV*234456677888*213213 3213 UNI... (0 Replies)
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below.
#masterscript.sh
./callingscript.sh
echo $fileExist
#callingscript.sh
echo "The script is called"... (2 Replies)
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
LEARN ABOUT OSX
net::ldap::control::postread
Net::LDAP::Control::PostRead(3) User Contributed Perl Documentation Net::LDAP::Control::PostRead(3)NAME
Net::LDAP::Control::PostRead - LDAPv3 Post-Read control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PostRead;
use Net::LDAP::Constant qw( LDAP_CONTROL_POSTREAD LDAP_SUCCESS );
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$postread = Net::LDAP::Control::PostRead->new( attrs => [ qw/givenName/ ] );
my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US",
replace => { givenName => "Babs" },
control => $postread );
if ($mesg->code eq LDAP_SUCCESS) {
my ($afterwards) = $mesg->control( LDAP_CONTROL_PREREAD );
my $entry = $afterwards ? $afterwards->entry() : undef;
if ($entry) {
print "givenName changed to '" .
join("', '", $entry->get_value(givenName") .
"' to 'Babs'
");
}
}
DESCRIPTION
"Net::LDAP::Control::PostRead" provides an interface for the creation and manipulation of objects that represent the "Post-Read Controls"
as described by RFC 4527.
In modification operations, the "Post-Read request control" indicates to the server that a copy of the modified entry after the update is
to be returned. After the successful completion of the operation, the accompanying "Post-Read response control" allows one to retrieve the
updated value from the servers's response.
One use case of this control may be to obtain values of operational attributes, such as the "entryUUID" and "modifyTimestamp" attributes,
updated by the server as part of the update operation.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
attrs => [ ATTR, ... ]
A list of attributes to be returned in the entry returned in the response control.
If absent, all attributes are returned.
Operational attributes may be included in the list by explicitly asking for them or by using special "+" feature (provided the server
supports this feature).
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.
In addition to these methods, the control also supports the following method:
entry ()
Returns the entry from the response control in the response message to the LDAP request that contained the request control.
The result is either a Net::LDAP::Entry object or undefined.
SEE ALSO
Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4527.txt
AUTHOR
Peter Marschall <peter@adpm.de>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2008,2011 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.2 2012-09-20 Net::LDAP::Control::PostRead(3)