For work i am trying to generate a combined csv file excisting out of 2 other csv files.
The problem i am facing is that the first field on both files have multiple values in there which arent always the same. This first field is also the joining part.
The layout of the files is as follows:
File1: EAN, Articlenr(our own)
File2: EAN, Articlenr(Supplier), SKU, Stock, Price
The first field can contain more then 1 EAN code in the following format:
Same goes for file 2.
Does anyone know a way how i can split the EAN codes so i can search them in the other file to combine both lines into 1 in another csv file?
I have about 20 CSV's that all look like this:
"","","","","","","","","","","","","","","",""What I've been told I need to produce is the exact same thing, but with each file now containing the start_code from every other file where the email matches.
It doesn't matter if any of the other... (1 Reply)
Hi,
I am regular reader of this forum. My advanced thanks to everyone.
Below given are the sample files
INDATA (Main data)
Fild1Çfld2Çfld3…..
Fild1Çfld2Çfld3…..
Fild1Çfld2Çfld3…..
Fild1Çfld2Çfld3…..
Fild1Çfld2Çfld3…..
.
.
N records (140000) eg
GRPDATA (Reference file) (2 Replies)
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Hi,
I've one requirement. I have to split one comma delimited file into multiple files based on one of the column values.
How can I achieve this Unix
Here is the sample data. In this case I have split the files based on date column(c4)
Input file
c1,c2,c3,c4,c5... (1 Reply)
Good day all
I need some helps,
say that I have data like below, each field separated by a tab
DATE NAME ADDRESS
15/7/2012 LX a.b.c
15/7/2012 LX1 a.b.c
16/7/2012 AB a.b.c
16/7/2012 AB2 a.b.c
15/7/2012 LX2 a.b.c... (2 Replies)
I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below:
column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10
"12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Hi guys,
I have a requirement where i need to split a .csv file into multiple files.
Say for example i have data.csv file and i have splitted that into multiple files based on some conditions i.e first file should have 100, last file 50 and other files 1000 each. Am passing the values in... (2 Replies)
Hi,
I have a file of csv data, which looks like this:
file1:
1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628
2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Hi,
In a csv file, I want to select records where first column has zero or multiple spaces.
Eg: abc.csv
,123,a
,22,b
,11,c
a,11,d
So output should be:
,123,a
,22,b
,11,c
Please advise (5 Replies)
Discussion started by: vegasluxor
5 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m10_004
CheckDigits::M10_004(3pm) User Contributed Perl Documentation CheckDigits::M10_004(3pm)NAME
CheckDigits::M10_004 - compute check digits for 2aus5, EAN, ILN, ISBN13, NVE
SYNOPSIS
use Algorithm::CheckDigits;
$ean = CheckDigits('ean');
if ($ean->is_valid('7622200004607')) {
# do something
}
$cn = $ean->complete('762220000460');
# $cn = '7622200004607'
$cd = $ean->checkdigit('7622200004607');
# $cd = '7'
$bn = $ean->basenumber('7622200004607');
# $bn = '762220000460'
DESCRIPTION
ALGORITHM
1. Beginning right all numbers are weighted alternatively 1 and 3 (that is the check digit is weighted 1).
2. The sum of all products is computed.
3. The sum of step 3 ist taken modulo 10.
4. The check digit is the difference between 10 and the number from step 3.
To validate the total of the digits of all numbers inclusive check digit taken modulo 10 must be 0.
METHODS
is_valid($number)
Returns true only if $number consists solely of digits, spaces and hyphen and the last digit is a valid check digit according to the
algorithm given above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and concatenated to the end of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits, spaces and hyphen.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the checkdigit of $number if $number has a valid check digit.
Return '' otherwise.
EXPORT
None by default.
BUGS AND LIMITATIONS
When invoked as "CheckDigits('isbn13')" the module checks whether the first three digits (the country code) are 978 or 979, the current (as
of 2006) EAN country codes for books. If at any time other EAN country codes for ISBN-13 will be specified and the then responsible
maintainer ignores this in the code, please send a friendly email.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de.
perl v5.10.0 2008-05-17 CheckDigits::M10_004(3pm)