10-30-2019
Anyone, please suggest me how to get the given pattern.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
Discussion started by: nickg
1 Replies
2. Shell Programming and Scripting
I have a file that will sometimes contain a pattern. The pattern is this:
FRM CHK 0000
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
Discussion started by: nickg
4 Replies
3. Shell Programming and Scripting
Hi I have the following Input
--
-- TABLE: BUSINESS_UNIT
--
ALTER TABLE RATINGS.BUSINESS_UNIT ADD CONSTRAINT FK1_BUSINESS_UNIT
FOREIGN KEY (PEOPLESOFT_CHART_FIELD_VALUE_ID)
REFERENCES RATINGS.PEOPLESOFT_CHART_FIELD_VALUE(PEOPLESOFT_CHART_FIELD_VALUE_ID)
;
ALTER TABLE... (1 Reply)
Discussion started by: pukars4u
1 Replies
4. Shell Programming and Scripting
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies
5. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
6. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
7. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
8. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
9. Shell Programming and Scripting
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies
LEARN ABOUT DEBIAN
mojolicious::routes::pattern
Mojolicious::Routes::Pattern(3pm) User Contributed Perl Documentation Mojolicious::Routes::Pattern(3pm)
NAME
Mojolicious::Routes::Pattern - Routes pattern engine
SYNOPSIS
use Mojolicious::Routes::Pattern;
# Create pattern
my $pattern = Mojolicious::Routes::Pattern->new('/test/:name');
# Match routes
my $result = $pattern->match('/test/sebastian');
say $result->{name};
DESCRIPTION
Mojolicious::Routes::Pattern is the core of Mojolicious::Routes.
ATTRIBUTES
Mojolicious::Routes::Pattern implements the following attributes.
"defaults"
my $defaults = $pattern->defaults;
$pattern = $pattern->defaults({foo => 'bar'});
Default parameters.
"format"
my $regex = $pattern->format;
$pattern = $pattern->format($regex);
Compiled regex for format matching.
"pattern"
my $pattern = $pattern->pattern;
$pattern = $pattern->pattern('/(foo)/(bar)');
Raw unparsed pattern.
"quote_end"
my $quote = $pattern->quote_end;
$pattern = $pattern->quote_end(']');
Character indicating the end of a quoted placeholder, defaults to ")".
"quote_start"
my $quote = $pattern->quote_start;
$pattern = $pattern->quote_start('[');
Character indicating the start of a quoted placeholder, defaults to "(".
"regex"
my $regex = $pattern->regex;
$pattern = $pattern->regex($regex);
Pattern in compiled regex form.
"relaxed_start"
my $relaxed = $pattern->relaxed_start;
$pattern = $pattern->relaxed_start('*');
Character indicating a relaxed placeholder, defaults to "#".
"reqs"
my $reqs = $pattern->reqs;
$pattern = $pattern->reqs({foo => qr/w+/});
Regex constraints.
"symbol_start"
my $symbol = $pattern->symbol_start;
$pattern = $pattern->symbol_start(':');
Character indicating a placeholder, defaults to ":".
"symbols"
my $symbols = $pattern->symbols;
$pattern = $pattern->symbols(['foo', 'bar']);
Placeholder names.
"tree"
my $tree = $pattern->tree;
$pattern = $pattern->tree([ ... ]);
Pattern in parsed form.
"wildcard_start"
my $wildcard = $pattern->wildcard_start;
$pattern = $pattern->wildcard_start('*');
Character indicating the start of a wildcard placeholder, defaults to "*".
METHODS
Mojolicious::Routes::Pattern inherits all methods from Mojo::Base and implements the following ones.
"new"
my $pattern = Mojolicious::Routes::Pattern->new('/:action');
my $pattern
= Mojolicious::Routes::Pattern->new('/:action', action => qr/w+/);
my $pattern = Mojolicious::Routes::Pattern->new(format => 0);
Construct a new pattern object.
"match"
my $result = $pattern->match('/foo/bar');
my $result = $pattern->match('/foo/bar', 1);
Match pattern against entire path, format detection is disabled by default.
"parse"
$pattern = $pattern->parse('/:action');
$pattern = $pattern->parse('/:action', action => qr/w+/);
$pattern = $pattern->parse(format => 0);
Parse a raw pattern.
"render"
my $path = $pattern->render({action => 'foo'});
my $path = $pattern->render({action => 'foo'}, 1);
Render pattern into a path with parameters, format rendering is disabled by default.
"shape_match"
my $result = $pattern->shape_match($path);
my $result = $pattern->shape_match($path, 1);
Match pattern against path and remove matching parts, format detection is disabled by default.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojolicious::Routes::Pattern(3pm)