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)
Hi,
I have a 5 gig file, no record terminators, field terminators are newline. The record length is 768 and I would like to check that every 768th byte is a newline and print out the byte position if it isn't. I would like to do this going either forward or backwards with one command if... (3 Replies)
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
I need a script that will run in unix to:
1) Read and input file with 1 column that contains for ex:
0123456789
1234567890
...etc
2) Checks the first column if it is:
a. Numeric from 0 - 9
b. if it is not less... (4 Replies)
Hi I am new to shell programming in unix
Please if I can provide help.
I have a file structure of a header record and "N" detail records.
The header record will be the total number of detail records
I need to split the file in 2:
One for the header
Another for all detail records
Could... (1 Reply)
Hi All
Need Help
I have a file with the below format (ABC.TXT) :
®¿¿ABCDHEJJSJJ|XCBJSKK01|M|7348974982790
HDFLJDKJSKJ|KJALKSD02|M|7378439274898
KJHSAJKHHJJ|LJDSAJKK03|F|9898982039999
(cont......)
I need to write a script where it will check for : blank lines (between rows,before... (6 Replies)
I need a script to check the records in a file , if any value match transfer the record in error.txt file.
1- If any of the any field value is NULL(nothing in this field)
Record1|Record2|Record3|Record4|Record5|DATE1|DATE2
Example:
11111111|22222222|NULL|12|444|27042018|27042018... (8 Replies)
Perl::Critic::Policy::Modules::ProhibitConditionalUseStaUsernContributed Perl DoPerl::Critic::Policy::Modules::ProhibitConditionalUseStatements(3)NAME
Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements - Avoid putting conditional logic around compile-time includes.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Modules included via "use" are loaded at compile-time. Placing conditional logic around the "use" statement has no effect on whether the
module will be loaded. Doing so can also serve to confuse the reader as to the author's original intent.
If you need to conditionally load a module you should be using "require" instead.
This policy will catch the following forms of conditional "use" statements:
# if-elsif-else
if ($a == 1) { use Module; }
if ($a == 1) { } elsif ($a == 2) { use Module; }
if ($a == 1) { } else { use Module; }
# for/foreach
for (1..$a) { use Module; }
foreach (@a) { use Module; }
# while
while ($a == 1) { use Module; }
# unless
unless ($a == 1) { use Module; }
# until
until ($a == 1) { use Module; }
# do-condition
do { use Module; } if $a == 1;
do { use Module; } while $a == 1;
do { use Module; } unless $a == 1;
do { use Module; } until $a == 1;
# operator-do
$a == 1 || do { use Module; };
$a == 1 && do { use Module; };
$a == 1 or do { use Module; };
$a == 1 and do { use Module; };
# non-string eval
eval { use Module; };
Including a module via "use" in bare blocks, standalone do blocks, or string evals is allowed.
# bare block
{ use Module; }
# do
do { use Module; }
# string eval
eval "use Module";
CONFIGURATION
This Policy is not configurable except for the standard options.
AUTHOR
Peter Guzis <pguzis@cpan.org>
COPYRIGHT
Copyright (c) 2010-2011 Peter Guzis. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements(3)