11-16-2012
thank you, but it doesnt work. it count 0 of p60
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a file (say 'file1')and I want to search for a first occurence of pattern (say 'ERROR') and print ten lines in the file below pattern. I have to code it in PERL and I am using Solaris 5.9.
I appreciate any help with code
Thanks
Ammu (6 Replies)
Discussion started by: ammu
6 Replies
2. Shell Programming and Scripting
Hello People,
Need some assistance/guidance.
OUTLINE:
Two files (File1 and File2)
File1 has some ids such as
009463_3922_1827
897654_8764_5432
File2 has things along the lines of:
Query= 009463_3922_1827 length=252
(252 letters)
More stufff here
... (5 Replies)
Discussion started by: Deep9000
5 Replies
3. Shell Programming and Scripting
Am trying to remove urls from text strings in PERL. I have the following but it does not seem to work:
$remarks =~ s/www\.\s+\.com//gi;
In English, I want to look for www. then I want to delete the www. and everything after it until I hit a space (but not including the space).
It's not... (2 Replies)
Discussion started by: mrealty
2 Replies
4. Shell Programming and Scripting
Hi,
I have one file in this format
20 value1
33 value2
56 value3
I have another file in this format:
34,30-SEP-09,57,100237775,33614510126,2,34
34,30-SEP-09,57,100237775,33620766654,2,34
34,30-SEP-09,108,100237775,33628458122,2,34
34,30-SEP-09,130,100237775,33635266741,2,254... (6 Replies)
Discussion started by: Donkey25
6 Replies
5. Shell Programming and Scripting
Hi Friends, I have a tuff time with regular expressionss. Please let me know how to make this happen as it consumed lots of my time but in vain. Here is the sample text file i need to match for. I need to search for pattern1 removed, if it matches then search for pattern types either SE\ or... (2 Replies)
Discussion started by: nmattam
2 Replies
6. Shell Programming and Scripting
using perl
Hi All, i was wondering if anyone can solve how to extract the full tag from the xml line ie not sure what to put in the m// to get the string
"/data/TOP471//context_data/instruments.txt"
I basically want the above filename in a variable for further processing...
$_ =" ... (0 Replies)
Discussion started by: satnamx
0 Replies
7. Shell Programming and Scripting
I have to replace a line, if it has a pattern for example
Suppose file.out contains:
<tr><td class="cB">Hello</td><td class="cB">1245</td><td class="cB">958</td><td class="cRB">1.34</td><td class="cRB">1.36</td></tr>
<tr><td class="cB">world</td><td class="cB">3256</td><td... (8 Replies)
Discussion started by: sol_nov
8 Replies
8. Shell Programming and Scripting
I have written a PERL script to read files from directory that the filename contains OT. It then takes each line of each file and prints the first 5 characters before the first occurence of a /.
Currently I am getting the error:
Use of uninitialized value in string at rowGrab.pl line 43.... (3 Replies)
Discussion started by: chris01010
3 Replies
9. Shell Programming and Scripting
Hi,
I have log like this:
... (1 Reply)
Discussion started by: justbow
1 Replies
10. Shell Programming and Scripting
Hi,
I have log like this:
... (1 Reply)
Discussion started by: justbow
1 Replies
LEARN ABOUT DEBIAN
inn::config
INN::Config(3pm) InterNetNews Documentation INN::Config(3pm)
NAME
INN::Config - Export all the variables an INN Perl script might need
DESCRIPTION
This Perl module sets up any and all the variables that an INN Perl script might need. More particularly, it allows to use inn.conf
variables: they are all provided by innconfval, as well as the version of INN (in the variable $INN::Config::VERSION for its short number
form, on in $INN::Config::version for its complete form). Other useful variables are also provided (directories, files, programs, masks,
parameters). The complete list can be obtained with the following script that prints them out:
use lib '<pathnews>/lib/perl';
use INN::Config;
use Data::Dumper;
my ($varname, $value);
foreach my $var (@INN::Config::EXPORT_OK) {
if ($var =~ /^$(.*)$/) {
$varname = "INN::Config::$1";
$value = Dumper($$varname);
$value =~ s/^$VAR1 = //;
print "$$varname = $value";
} elsif ($var =~ /^@(.*)$/) {
$varname = "INN::Config::$1";
$value = Dumper(@$varname);
$value =~ s/^$VAR1 = //;
print "@$varname = $value";
}
}
A local Perl script named innshellvars.pl.local in pathetc will be loaded, if present and executable, at the end of the run of this module.
A typical use is to add or override variables.
You only have to declare the module at the beginning of them:
use lib '<pathnews>/lib/perl';
use INN::Config;
Then, you can for instance use:
print $INN::Config::localmaxartsize;
to print the value of localmaxartsize as it is set in inn.conf.
You can also specify a version when you import the module. If you write:
use INN::Config 2.5.0;
only versions of INN superior to 2.5.0 will be able to run the Perl script.
It is also possible to import the variables directly in your namespace if you specify what you want to import:
use INN::Config qw($localmaxartsize $pathbin);
Note that a legacy innshellvars.pl is also provided in pathnews/lib for compatibility reasons with old Perl scripts not shipped with INN.
It was used by versions of INN anterior to 2.5.0. The corresponding scripts for Shell and Tcl are, however, still in use: innshellvars
and innshellvars.tcl. They offer the same capabilities as this module.
HISTORY
innshellvars.pl was written by James Brister <brister@vix.com> for InterNetNews in 1996. It was converted to the INN::Config Perl module
by Julien Elie in 2007.
$Id: Config.pm.in 9311 2011-08-06 20:18:42Z iulius $
SEE ALSO
inn.conf(5), innconfval(1), perl(1).
INN 2.5.3 2011-08-22 INN::Config(3pm)