I don't understand what you mean by extract error records,
my code is giving the exact output you wanted (as mentioned in your post)
if you want the output in a file you can just direct the output towards one
Hi All,
I need to select only those records having a non zero record in the first column of a comma delimited file.
Suppose my input file is having data like:
"0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005"
"0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
I'll try explain this as best I can. Let me know if it is not clear.
I have large text files that contain data as such:
143593502 09-08-20 09:02:13 xxxxxxxxxxx xxxxxxxxxxx 09-08-20 09:02:11 N line 1 test
line 2 test
line 3 test
143593503 09-08-20 09:02:13... (3 Replies)
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
Hello Friends,
I have a file(InputFile.csv) with the following columns(the columns are pipe-delimited):
ColA|ColB|ColC|ColD|ColE|ColF
Now for this file, I have to get those records which fulfil the following condition:
If "ColB" is NOT NULL and "ColD" has values one of the following... (9 Replies)
Hi,
I have a shell script which extracts records form oracle to unix file.
sqlplus -s ${WMD_DM_CONNECT} <<EOF >$tmpfile
set heading off
set pagesize 0
set feedback off
select CD_DESC||'|'||CD_ID||'|'||'Arun'||'|'||'Montu' from WMD_SYS_CD_LKUP
where CD_TYP =... (5 Replies)
I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed?
file1
ARG 81.9 8 81.9 0
LEU 27.1 9 27.1 0
PHE .0 10 .0 0
ASP 59.8 11 59.8 0
ASN 27.6 12 27.6 0
ALA .0 13 .0 0... (5 Replies)
In the file below I am trying to extract a specific instance of path, if the adjacent plugin": "/rundb/api/v1/plugin/49/. Thank you :).
file
"path": "/results/analysis/output/Home/Auto_user_S5-00580-4-Medexome_65_028/plugin_out/FileExporter_out.52", "plugin": "/rundb/api/v1/plugin/49/",... (8 Replies)
I'm new to shell programming, I have a huge text file in the following format, where columns are separated by single space:
ACA MEX 4O_ $98.00 $127.40 $166.60 0:00 0:00 0 ;
ACA YUL TS_ $300.00 $390.00 $510.00 0:00 0:00 0 ;
ACA YYZ TS_ $300.00 $390.00 $510.00 0:00 0:00 0 ;
ADZ YUL TS_ $300.00... (3 Replies)
I have two files and would need to filter out records based on certain criteria, these column are of variable lengths, but the lengths are uniform throughout all the records of the file. I have shown a sample of three records below. Line 1-9 is the item number "0227546_1" in the case of the first... (15 Replies)
Discussion started by: MIA651
15 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m11_010
CheckDigits::M11_010(3pm) User Contributed Perl Documentation CheckDigits::M11_010(3pm)NAME
CheckDigits::M11_010 - compute check digits AHV number (CH)
SYNOPSIS
use Algorithm::CheckDigits;
$ahv = CheckDigits('ahv_ch');
if ($ahv->is_valid('123.45.678.113')) {
# do something
}
$cn = $ahv->complete('123.45.678.11');
# $cn = '123.45.678.113'
$cd = $ahv->checkdigit('123.45.678.113');
# $cd = '3'
$bn = $ahv->basenumber('123.45.678.113');
# $bn = '123.45.678.11';
DESCRIPTION
ALGORITHM
1. Beginning left every digit is weighted with 5,4,3,2,7,6,5,4,3,2.
2. The weighted digits are added.
3. The sum from step 2 is taken modulo 11.
4. The checkdigit is 11 minus the sum from step 3. Is the difference 10, the number won't be taken. If the difference is 11, the
checkdigit is 0.
METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and hyphens and the two digits in the middle are valid check digits according
to the algorithm given above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and inserted into the middle of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits, hyphens and spaces.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the check digits of $number if $number has valid check digits.
Return '' otherwise.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de,
perl v5.10.0 2008-05-17 CheckDigits::M11_010(3pm)