I tried awk for this, but failed <or my code is not correct? I dont know>. Can anyone help me on this?
---------- Post updated at 08:34 PM ---------- Previous update was at 08:29 PM ----------
my working file looks like this:
<empty>
<empty>
<empty>
NAME :ABC AGE :15
GENDER... (6 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
I have a textfile containing text similar to the following pattern:
STRING1
UNIQUE_STRING1
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING2
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING3
STRING2
STRING3 (6 Replies)
File name : Sample.txt
<ownername>Oracle< ownername>
I am new to unix world , i would like to search string and return back to another sh script.
bascially i want to read file Sample.txt find the string between <ownername> Sample.txt < ownername> .
Gerneric way to find the string... (15 Replies)
I am parsing a nagios config, searching for a string, and then printing the line 2 lines later (the "members" string). Here's the data:
define hostgroup{
hostgroup_name chat-dev
alias chat-dev
members thisisahostname
}
define hostgroup{
... (1 Reply)
I would like to search for strings stored in searchstringfile.txt in inputfiles.
searchstringfile.txt
J./F.
Gls. Wal
F.
Towerinput1.txt
What is needed is J./F. 12 var Gls. Wal 16 interp. Tower 12 input2.txt
Awk shall search for F. 16 pt. J./F. 22 output.txt
input1.txt J./F. = 12 var... (3 Replies)
I need to search this "<CardinalMPI>" string and replace the same string above two lines of the string.
Nov 16, 2012 12:58:34 PM
INFO: Centinel LookUp ResponseXML : <CardinalMPI>
<ReasonCode></ReasonCode>
<ErrorDesc></ErrorDesc>
<MerchantReferenceNumber></MerchantReferenceNumber>... (4 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Ok I would like to do the following
file test contains the following lines. between the lines ABC there may be any amount of lines up to the next ABC entry.
I want to grep for the filename.txt entry and print the lines in between (and including that line) up to and including the last line... (3 Replies)
Discussion started by: revaroo
3 Replies
LEARN ABOUT DEBIAN
catalyst::engine::apache::mp13
Catalyst::Engine::Apache::MP13(3pm) User Contributed Perl Documentation Catalyst::Engine::Apache::MP13(3pm)NAME
Catalyst::Engine::Apache::MP13 - Catalyst Apache mod_perl 1.3x Engine
SYNOPSIS
# Set up your Catalyst app as a mod_perl 1.3x application in httpd.conf
<Perl>
use lib qw( /var/www/MyApp/lib );
</Perl>
# Preload your entire application
PerlModule MyApp
<VirtualHost *>
ServerName myapp.hostname.com
DocumentRoot /var/www/MyApp/root
<Location />
SetHandler perl-script
PerlHandler MyApp
</Location>
# you can also run your app in any non-root location
<Location /some/other/path>
SetHandler perl-script
PerlHandler MyApp
</Location>
# Make sure to let Apache handle your static files
# (And remember to remove the Static::Simple plugin in production)
<Location /static>
SetHandler default-handler
</Location>
</VirtualHost>
DESCRIPTION
This is the Catalyst engine specialized for Apache mod_perl version 1.3x.
Apache::Registry
While this method is not recommended, you can also run your Catalyst application via an Apache::Registry script.
httpd.conf:
PerlModule Apache::Registry
Alias / /var/www/MyApp/script/myapp_registry.pl/
<Directory /var/www/MyApp/script>
Options +ExecCGI
</Directory>
<Location />
SetHandler perl-script
PerlHandler Apache::Registry
</Location>
script/myapp_registry.pl (you will need to create this):
#!/usr/bin/perl
use strict;
use warnings;
use MyApp;
MyApp->handle_request( Apache->request );
METHODS
ok_constant
OVERLOADED METHODS
This class overloads some methods from "Catalyst::Engine::Apache".
$c->engine->finalize_headers
SEE ALSO
Catalyst, Catalyst::Engine, Catalyst::Engine::Apache.
AUTHORS
o Sebastian Riedel <sri@cpan.org>
o Christian Hansen <ch@ngmedia.com>
o Andy Grundman <andy@hybridized.org>
o Tomas Doran <bobtfish@bobtfish.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by The "AUTHORS".
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.10.1 2010-11-26 Catalyst::Engine::Apache::MP13(3pm)