hi every one ,
here is my problem !!
i have to run my script from an account and update the result in a xml file located on a different account. i use existing ssh keys to do it remotely
for example the tags looks like this
<PropertyValueList... (1 Reply)
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Hi All,
Need help on this
I have 2 files
one file file1 which has several entries as :
define service{
hostgroup_name !host1,!host5,!host6,.*
service_description check_nrpe
}
define service{
hostgroup_name !host2,!host4,!host6,.*
service_description check_opt
}
another... (2 Replies)
Hi Experts,
I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Hi all,
I have 2 files:
species-names.txt
Abaca-bunchy-top-virus ((((Abaca-bunchy-top-virus((Babuvirus((Unassigned((Nanoviridae((Unassigned))))
Abutilon-mosaic-virus ((((Abutilon-mosaic-virus((Begomovirus((Unassigned((Geminiviridae((Unassigned))))... (2 Replies)
Hello,
Some time ago a helpful awk file was provided on the forum which I give below:
NR==FNR{A=$0;next}{for(j in A){split(A,P,"=");for(i=1;i<=NF;i++){if($i==P){$i=P}}}}1
While it works beautifully on English and Latin characters i.e. within the ASCII range of 127, the moment a character beyond... (6 Replies)
Hi. I need assistance with the replacing of text into a specific file via a bash script.
My bash script, once run, currently provides a menu of computer names to choose.The script copies onto my system various files, depending what computer was selected in the menu.This is working OK.
Now, I... (1 Reply)
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Hello,
I have been working on script in which search and replace the multiple pattern.
1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh
2. change_text.sh read... (0 Replies)
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
Discussion started by: Grueben
1 Replies
LEARN ABOUT MOJAVE
io::dir
IO::Dir(3pm) Perl Programmers Reference Guide IO::Dir(3pm)NAME
IO::Dir - supply object methods for directory handles
SYNOPSIS
use IO::Dir;
$d = IO::Dir->new(".");
if (defined $d) {
while (defined($_ = $d->read)) { something($_); }
$d->rewind;
while (defined($_ = $d->read)) { something_else($_); }
undef $d;
}
tie %dir, 'IO::Dir', ".";
foreach (keys %dir) {
print $_, " " , $dir{$_}->size,"
";
}
DESCRIPTION
The "IO::Dir" package provides two interfaces to perl's directory reading routines.
The first interface is an object approach. "IO::Dir" provides an object constructor and methods, which are just wrappers around perl's
built in directory reading routines.
new ( [ DIRNAME ] )
"new" is the constructor for "IO::Dir" objects. It accepts one optional argument which, if given, "new" will pass to "open"
The following methods are wrappers for the directory related functions built into perl (the trailing 'dir' has been removed from the
names). See perlfunc for details of these functions.
open ( DIRNAME )
read ()
seek ( POS )
tell ()
rewind ()
close ()
"IO::Dir" also provides an interface to reading directories via a tied hash. The tied hash extends the interface beyond just the directory
reading routines by the use of "lstat", from the "File::stat" package, "unlink", "rmdir" and "utime".
tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ]
The keys of the hash will be the names of the entries in the directory. Reading a value from the hash will be the result of calling
"File::stat::lstat". Deleting an element from the hash will delete the corresponding file or subdirectory, provided that "DIR_UNLINK" is
included in the "OPTIONS".
Assigning to an entry in the hash will cause the time stamps of the file to be modified. If the file does not exist then it will be
created. Assigning a single integer to a hash element will cause both the access and modification times to be changed to that value.
Alternatively a reference to an array of two values can be passed. The first array element will be used to set the access time and the
second element will be used to set the modification time.
SEE ALSO
File::stat
AUTHOR
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perlbug@perl.org>.
COPYRIGHT
Copyright (c) 1997-2003 Graham Barr <gbarr@pobox.com>. 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.18.2 2013-11-04 IO::Dir(3pm)