Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2
file 1 sample
SNDK 80004C101 AT
XLNX 983919101 BB
NETL 64118B100 BS
AMD 007903107 CC
KLAC 482480100 DC
TER 880770102 KATS
ATHR 04743P108 KATS... (7 Replies)
Hi All,
I have a file with data as below:
A,FILE1_MYFILE_20130309_1038,80,25.60
B,FILE1_MYFILE_20130309_1038,24290,18543.38
C,FILE1_dsc_dlk_MYFILE_20130309_1038,3,10.10
A,FILE2_MYFILE_20130310_1039,85,110.10
B,FILE2_MYFILE_20130310_1039,10,12.10... (10 Replies)
Hi all I have a need of searching some pattern in file by month and then count unique records
D11
G11
R11 -------> Pattern available in file
S11
Jan$1 to $5 column contains some records in which I want to find unique
for this purpose I have written script like below
awk '/Jan/ ||... (4 Replies)
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Hi All,
I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record.
For example, let's assume for column D... (9 Replies)
file:
1|12322|tow|
5|23422|pow|
6|23423|cow|
3|34324|how|
deletelines:
12322
23423
My command to delete line
while read NUM
do
awk -F"\|" '$2 !~ /`"$NUM"`/' file >file.back
mv file.back file
done<deletelines (3 Replies)
Hi all,
I have searched and searched, but I have not found a solution that quite fits what I am trying to do.
I have a long list of data in three columns. Below is a sample:
1,10,8
2,12,10
3,13,12
4,14,14
5,15,16
6,16,18
Please use code tags
What I need to do is as follows: If a... (4 Replies)
Discussion started by: bleedingturnip
4 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m10_001
CheckDigits::M10_001(3pm) User Contributed Perl Documentation CheckDigits::M10_001(3pm)NAME
CheckDigits::M10_001 - compute check digits for Bahncard (DE), IMEI, IMEISV, ISIN, Miles&More, Payback (DE), Personnummer (SE), Passport
(BR), Credit Cards, SSN (US), Samordningsnummer (SE), VAT RN (ES), VAT RN (IT), VAT RN (SE), International Securities Identifikation Number
(ISIN)
SYNOPSIS
use Algorithm::CheckDigits;
$visa = CheckDigits('visa');
if ($visa->is_valid('4111 1111 1111 1111')) {
# do something
}
$cn = $visa->complete('4111 1111 1111 111');
# $cn = '4111 1111 1111 1111'
$cd = $visa->checkdigit('4111 1111 1111 1111');
# $cd = '7'
$bn = $visa->basenumber('4111 1111 1111 1111');
# $bn = '4111 1111 1111 111'
DESCRIPTION
ALGORITHM
1. Beginning right all numbers are weighted alternatively 1 and 2 (that is the check digit is weighted 1).
2. The total of the digits 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 numbers 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 and spaces.
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.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de.
For IMEI, IMEISV: ETSI Technical Specification TS 100 508 (v6.2.0)
perl v5.10.0 2008-05-17 CheckDigits::M10_001(3pm)