I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
I need to count the number of files which have a search string, but counting the file only once
if search string is found.
eg: File1: Please note that there are 2 occurances of "aaa"
aaa
bbb
ccc
aaa
File2: Please note that there are 3 occurances of "aaa"
aaa
bbb
ccc... (1 Reply)
Hi All,
I have a delimited file.Sometime it happens that delimiter get missed between 2 fields,so i need to count the number of delimiter present at each line.
exam
file.txt
a|b|c|d
e|f|a
cc|dd
so output should be
1 3
2 2
3 1
Thanks (2 Replies)
Hi,
I am trying out different scripts in PERL. I want to take a line/string as an input from the user and count the number of occurrances of all the alphabets (a..z) in the string. I tried doingit like this :
#! /opt/exp/bin/perl
print "Enter a string or line : ";
$string = <STDIN>;
chop... (5 Replies)
I've been working with an awk script and I'm wondeing id it's possible to count records in a file which DO NOT contain, in this instance fields 12 and 13.
With the one script I am wanting to display the count for the records WITH fields 12 and 13 and a seperate count of records WITHOUT fields... (2 Replies)
Hi,
Please help me in counting the below records(1st field) from samplefile:
Expected output:
Count Descr
-------------------------------------------
7 Mean manager
14 ... (7 Replies)
I’m new to Linux script and not sure how to filter out bad records from huge flat files (over 1.3GB each). The delimiter is a semi colon “;”
Here is the sample of 5 lines in the file:
Name1;phone1;address1;city1;state1;zipcode1
Name2;phone2;address2;city2;state2;zipcode2;comment... (7 Replies)
i need to be able to count the number of single quotes ' in the entire string below:
"description":"DevOps- Test VM's, System Admins Test VM's ",
awk can most likely do this, but here's my attempt using egrep:
echo "${STRING}" | egrep -wc '"'"\'"'"'
or
echo "${STRING}" | egrep -wc... (11 Replies)
we want the count of number of records to be printed on each row.
For Ex:
if there are 5 records on one unique id , the count "5'' should be printed on each record in other column. Please help for this. I am using unix & Cygwin.
Below are sample records:
KCZ0650473... (2 Replies)
Discussion started by: ElijaRajesh
2 Replies
LEARN ABOUT DEBIAN
jifty::action::record::execute
Jifty::Action::Record::Execute(3pm) User Contributed Perl Documentation Jifty::Action::Record::Execute(3pm)NAME
Jifty::Action::Record::Execute - Simple abstract based for record actions
SYNOPSIS
use strict;
use warnings;
package MyApp::Action::StartEncabulator;
use base qw/ MyApp::Action::ExecuteEncabulator /;
use Jifty::Param::Schema;
use Jifty::Action schema {
param cardinal_grammeter_mode =>
type is 'text',
valid_values are qw/
magneto-reluctance
capacitive-duractance
sinusoidal-depleneration
/,
is mandatory,
;
};
sub take_action {
my $self = shift;
my $mode = $self->argument_value('cardinal_grammeter_mode');
$self->record->start($mode);
$self->result->success('Deluxe Encabulator has started!');
}
# Later in your templates:
my $encabulator = MyApp::Model::Encabulator->new;
$encabulator->load($id);
my $startup = Jifty->web->new_action(
class => 'StartEncabulator',
record => $encabulator,
);
Jifty->web->form->start;
Jifty->web->out( $startup->form_field('cardinal_grammeter_mode') );
Jifty->web->form->submit(
label => _('Start'),
submit => $startup,
);
Jifty->web->form->end;
DESCRIPTION
This action class is a good generic basis for creating custom action classes. It expects a record object to be associated and is (in this
way) very similar to Jifty::Action::Record::Delete.
You can use Jifty::Param::Schema to add additional form fields to the action and such.
METHODS
arguments
This is customized so that it expects the "record" argument of all Jifty::Action::Record actions, but also allows for overrides using
Jifty::Param::Schema.
take_action
This overrides the definition in Jifty::Action::Record so that it does absolutely nothing rather than complain. You will probably want to
implement your own version that actually does something.
SEE ALSO
Jifty::Action, Jifty::Action::Record, Jifty::Record
LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself.
perl v5.14.2 2010-12-10 Jifty::Action::Record::Execute(3pm)