My data is xml'ish (here is an excerpt) :-
<bag name="mybag1" version="1.0"/>
<contents id="coins"/>
<bag name="mybag2" version="1.1"/>
<contents id="clothes"/>
<contents id="shoes"/>
<bag name="mybag3" version="1.6"/>
I want to delete line containing mybag2 and its subsequent... (5 Replies)
Hi!
From a file like this one :
hello
...
PATTERN1
...
lines between patterns
..
PATTERN2
...
I would like to extract only the lines between patterns, probably with awk I think?
Thanks a lot for your help,
Tipi (5 Replies)
Hi,
From the sample file below
Conditions
1) Pattern Range must start with "ALTER TABLE"
2) Pattern Range ends when it finds ";"
3) Between this range i want to select all the patterns that contain pattern " MOVE "
Note : I would like to exclude the above pattern matches and print... (1 Reply)
Hi,
Here is a sample of my Test File
$ cat TestFile1
Prompt Table DQZ_ALTER_SCHEMA_ID;
ALTER TABLE DQZ.DQZ_ALTER_SCHEMA_ID MONITORING;
ALTER TABLE DQZ.DQZ_ALTER_SCHEMA_ID STORAGE ( NEXT 3464K );
Prompt Table DQZ_ALTER_SCHEMA_ID;
ALTER TABLE DQZ.DQZ_ALTER_SCHEMA_ID
MOVE LOB... (16 Replies)
Hi,
I have a file like below:
.
.
.
.
Jack is going home
Jack is going to school
Jack is sleeping
Jack is eating dinner
John is going home
John is eating breakfast
.
.
.
The specific line is:
Jack is going home (2 Replies)
Hi folks,
I have a file which contains several occurences of 2 different patterns. I need to find out the line of first occurence of pattern2 starting after the position of first occurence of pattern1.
example file:
aaaa
pattern2
bbbb
pattern1
ccc
pattern2
ddd
pattern1
eee
pattern2... (9 Replies)
Hi all!
How can I delete all the text starting from <string1> to <string2> in all the .txt files of the folder "FOLDER" ?
Thanks a lot!
mjomba
...
</s>
<s>
<w></w>
</s>
<s>
...
to get: (1 Reply)
Hello, I'm looking for sed solution to change
...
<li>keyword</li>
<li>keyword
<li>keyword</li>
<li>keyword
<li>keyword</li>
...
to
...
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
...
I.e., if lines beginning with <li> do not end with... (3 Replies)
I have the below 2 files:
1) Third field from file1.txt should be compared to the first field of lookup.txt.
2) If match found then third field, file1.txt should be substituted with the second field from lookup.txt.
3)Else just print the line from file1.txt.
File1.txt:... (4 Replies)
Version: RHEL 6.5
In the below text file, I want to find the lines which has the string JOHN , KATE and STEVE in it.
The logic is to grep with an AND condition ie. get all lines with JOHN AND KATE AND STEVE
$ cat sometext.txt
PHILIP worked in HR
JOHN along with KATE fixed several IT... (4 Replies)
Discussion started by: John K
4 Replies
LEARN ABOUT DEBIAN
mojolicious::routes::match
Mojolicious::Routes::Match(3pm) User Contributed Perl Documentation Mojolicious::Routes::Match(3pm)NAME
Mojolicious::Routes::Match - Routes visitor
SYNOPSIS
use Mojolicious::Routes;
use Mojolicious::Routes::Match;
# Routes
my $r = Mojolicious::Routes->new;
$r->get('/foo')->to(action => 'foo');
$r->put('/bar')->to(action => 'bar');
# Match
my $m = Mojolicious::Routes::Match->new(PUT => '/bar');
$m->match($r);
say $m->captures->{action};
DESCRIPTION
Mojolicious::Routes::Match is a visitor for Mojolicious::Routes structures.
ATTRIBUTES
Mojolicious::Routes::Match implements the following attributes.
"captures"
my $captures = $m->captures;
$m = $m->captures({foo => 'bar'});
Captured parameters.
"endpoint"
my $endpoint = $m->endpoint;
$m = $m->endpoint(Mojolicious::Routes->new);
The routes endpoint that actually matched.
"root"
my $root = $m->root;
$m = $m->root($routes);
The root of the routes tree.
"stack"
my $stack = $m->stack;
$m = $m->stack([{foo => 'bar'}]);
Captured parameters with nesting history.
METHODS
Mojolicious::Routes::Match inherits all methods from Mojo::Base and implements the following ones.
"new"
my $m = Mojolicious::Routes::Match->new(GET => '/foo');
my $m = Mojolicious::Routes::Match->new(GET => '/foo', $ws);
Construct a new match object.
"match"
$m->match(Mojolicious::Routes->new, Mojolicious::Controller->new);
Match against a routes tree.
"path_for"
my $path = $m->path_for;
my $path = $m->path_for(foo => 'bar');
my $path = $m->path_for({foo => 'bar'});
my $path = $m->path_for('named');
my $path = $m->path_for('named', foo => 'bar');
my $path = $m->path_for('named', {foo => 'bar'});
my ($path, $ws) = $m->path_for;
my ($path, $ws) = $m->path_for(foo => 'bar');
my ($path, $ws) = $m->path_for({foo => 'bar'});
my ($path, $ws) = $m->path_for('named');
my ($path, $ws) = $m->path_for('named', foo => 'bar');
my ($path, $ws) = $m->path_for('named', {foo => 'bar'});
Render matching route with parameters into path.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojolicious::Routes::Match(3pm)