Sponsored Content
Full Discussion: Count pattern line by line
Top Forums UNIX for Beginners Questions & Answers Count pattern line by line Post 303043562 by vbe on Friday 31st of January 2020 12:28:12 PM
Old 01-31-2020
To make the situation clear, this thread is closed till the OP replies to the questions of the moderator
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get the line count from 2nd line of the file ?

Hi, I want to get the line count of the file from the 2nd line of the file ? The first line is header so want to skip that. Thanks. (8 Replies)
Discussion started by: smc3
8 Replies

2. UNIX for Dummies Questions & Answers

find pattern delete line with pattern and line above and line below

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

3. Shell Programming and Scripting

find pattern, delete line with pattern and line above and line below

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

4. Shell Programming and Scripting

Perl line count if it matches a pattern

#!/usr/bin/perl use Shell; open THEFILE, "C:\galileo_integration.txt" || die "Couldnt open the file!"; @wholeThing = <THEFILE>; close THEFILE; foreach $line (@wholeThing){ if ($line =~ m/\\0$/){ @nextThing = $line; if ($line =~ s/\\0/\\LATEST/g){ @otherThing =... (2 Replies)
Discussion started by: nmattam
2 Replies

5. Shell Programming and Scripting

Shell script to count number of ~ from each line and compare with next line

Hi, I have created one shell script in which it will count number of "~" tilda charactors from each line of the file.But the problem is that i need to count each line count individually, that means. if line one contains 14 "~"s and line two contains 15 "~"s then it should give an error msg.each... (3 Replies)
Discussion started by: Ganesh Khandare
3 Replies

6. Shell Programming and Scripting

Grep the word from pattern line and update in subsequent lines till next pattern line reached

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

Count number of pattern matches per line for all files in directory

I have a directory of files, each with a variable (though small) number of lines. I would like to go through each line in each file, and print the: -file name -line number -number of matches to the pattern /comp/ for each line. Two example files: cat... (4 Replies)
Discussion started by: pathunkathunk
4 Replies

8. Shell Programming and Scripting

awk to combine lines from line with pattern match to a line that ends in a pattern

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

9. Shell Programming and Scripting

Count the pipes "|" in line and delete line if count greter then number.

Hello, I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17". i.e need to get records having exact 17 pipe separated fields(no more or less) currently i have below : awk... (1 Reply)
Discussion started by: ketanraut
1 Replies

10. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
Jifty::Plugin::Comment::Notification::CommentNeedsModeraUser(Contributed Perl DocJifty::Plugin::Comment::Notification::CommentNeedsModeration(3pm)

NAME
Jifty::Plugin::Comment::Notification::CommentNeedsModeration - new comments made, but not published SYNOPSIS
To activate this notification, you must override the notification in your application. use strict; use warnings; package MyApp::Notification::CommentNeedsModeration; use base qw/ Jifty::Plugin::Comment::Notification::CommentNeedsModeration /; sub setup { my $self = shift; # Limit to users that have a "moderator" column set to 1 my $users = MyApp::Model::UserCollection->new; $users->limit( column => 'moderator', value => 1 ); $self->to_list(@{ $users->items_array_ref }); $self->SUPER::setup(@_); } sub url { my $self = shift; return Jifty->config->framework('Web')->{'BaseURL'} . $self->parent->permalink . '#comment-'.$self->comment->id; } 1; DESCRIPTION
This notificaiton (when properly configured) is sent out to any who need to know when a comment has been created, but not published because Net::Akismet has marked it as spam. METHODS
setup This method sets up the notification. This method should be overridden to setup "to_list" in Jifty::Notification to select who will receive this message. See the "SYNOPSIS". comment This will contain the Jifty::Plugin::Comment::Model::Comment that has been published. parent This will contain the object that the comment has been attached to. url THis returns the URL that the message will link to. This should be overridden to provide application-specific URLs. The default implementation returns the BaseURL setting for the application. SEE ALSO
Jifty::Notification, Jifty::Plugin::Comment::Notification::CommentPublished AUTHOR
Andrew Sterling Hanenkamp, "<hanenkamp@cpan.org>" COPYRIGHT AND LICENSE
Copyright 2008 Boomer Consulting, Inc. All Rights Reserved. This program is free software and may be modified and distributed under the same terms as Perl itself. perl v5.12.4 2009-03-09 Jifty::Plugin::Comment::Notification::CommentNeedsModeration(3pm)
All times are GMT -4. The time now is 11:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy