09-19-2008
Hi jim,
its so nice you see my post answer, but lets see there are two points, lets suppose i want to comment a particular line number with "#" and wants to add one line text on particular line number, for example i want to comment 45th line and wants to add another line after 90th line and if it is already done so it wont do anything how can i put this.
Thanks, pls advice.
bash
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am a new Unix user and I would like to know which link to go to in order to learn Unix online. Something like tutorials for beginners (1 Reply)
Discussion started by: John K. Mbuki
1 Replies
2. Shell Programming and Scripting
i am new to perl. i am writing a perl script. i want to know how to change the working directories? for ex. i have a perl script in c:\proj\ . i want to run this script in this directory but i need my script to change its working directory to D:\xyz\ dynamically in the script.
your help is... (1 Reply)
Discussion started by: megastar
1 Replies
3. Shell Programming and Scripting
Hi,
probably a newbie question..... But there it goes. :o
I have a list words. This list is taken out of a file with grep and cut.
my @system = (`grep up system_list| cut -d':' -f1`
);
system=
sm00xp03
sm01ftp02
sm00ssh12
What I want to have is a list, with each of the words in the... (1 Reply)
Discussion started by: pmpx
1 Replies
4. Shell Programming and Scripting
Hi,
i have one file, filename -> a.txt, i want that simple way just enter command and it will do that, not through redirection way.
AAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEE
FFFFFFFFFFFFFFFFFFFFFFF
i want... (10 Replies)
Discussion started by: learnbash
10 Replies
5. Shell Programming and Scripting
Hi
I want to match time hr:mm and change to mm:hr
please let me know how to do that in perl (2 Replies)
Discussion started by: lakshmikant
2 Replies
6. Programming
i have following code that runs fine on my Ubuntu workstation. However when i run this on a HPUX it wont open the text file i am trying to open for editing. I figured i just have to change gvim editor to vi, but that didnt work out well. Can some one help me out here? This is written in Perl
... (1 Reply)
Discussion started by: usustarr
1 Replies
7. Shell Programming and Scripting
Hi
Can any one please support:
From Windows, I am running perl script located in C:/scripts directory and need to run a command "ls | sort | uniq" on the files in D:/temp directory.
#!c:\perl\bin\perl.exe
$file_dir="D:\\temp";
$command1="cd";
$command2="ls | sort | uniq";... (2 Replies)
Discussion started by: sureshcisco
2 Replies
8. Shell Programming and Scripting
Hello,
I'm quite new to perl so my question is rather basic and I know there is probably a simple way around it but I can't seem to find it.
I have a medium-length code and there is a part that works with a nested for loop:
foreach my $j(@primpiddelta){
for (my $k=1;... (0 Replies)
Discussion started by: acsg
0 Replies
9. Shell Programming and Scripting
Hi, I have a file with the following line
open (unit=2, file='t0_p0.DAT')I want to change the value of the above zeros with variables $i and $j using a simple perl one linear.
I've tried the following but it doesn't work
perl -i -pe "/open/&&s/t\d+_p\d+/t$j_p$i/" fileThanks! (3 Replies)
Discussion started by: lost.identity
3 Replies
10. Shell Programming and Scripting
I have executed the below perl script for copying the file from one server to another server using scp.
#!/usr/bin/perl -w
use Net::SCP::Expect;
use strict;
$server= "x.x.x.x";
my $source = "/mypath/mypath";
my $destination = "/home/";
print "Login...Starting scp...";
$user="admin";... (1 Reply)
Discussion started by: scriptscript
1 Replies
LEARN ABOUT SUSE
net::ldap::control::entrychange
Net::LDAP::Control::EntryChange(3) User Contributed Perl Documentation Net::LDAP::Control::EntryChange(3)
NAME
Net::LDAP::Control::EntryChange - LDAPv3 Entry Change Notification control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PersistentSearch;
use Net::LDAP::Constant qw(LDAP_CONTROL_ENTRYCHANGE);
$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;
my ($control) = $message->control(LDAP_CONTROL_ENTRYCHANGE);
print $control->changeType()." ".$entry->dn()."
";
}
DESCRIPTION
"Net::LDAP::Control::EntryChange" provides an interface for the creation and manipulation of objects that represent the
"EntryChangeNotification" control as described by draft-smith-psearch-ldap-01.txt.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
changeType
An integer value telling the type of LDAP operation that the entry has undergone. It is one of the following values (which represent
the LDAP operations indicated next to them):
1 = add
2 = delete
4 = modify
8 = modDN
previousDN
When changeType is 8 (for modDN) this parameter tells the entry's DN before the modDN operation. In all other cases this value is not
defined.
changeNumber
This is the change number according to <draft-good-ldap-changelog-03.txt> assigned by a server for the change. If a server supports an
LDAP Change Log it should include this field.
Usually you do not need to create a "Net::LDAP::Control::EntryChange" control yourself because it is provided by the server in response to
an option with the "Net::LDAP::Control::PersistentSearch" control.
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::PersistentSearch
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.12.1 2010-03-12 Net::LDAP::Control::EntryChange(3)