Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

algorithm::checkdigits::m11_017(3pm) [debian man page]

CheckDigits::M11_017(3pm)				User Contributed Perl Documentation				 CheckDigits::M11_017(3pm)

NAME
CheckDigits::M11_017 - compute check digits for EC-No, EINECS, ELINCS SYNOPSIS
use Algorithm::CheckDigits; $ecno = CheckDigits('ecno'); if ($ecno->is_valid('200-236-6')) { # do something } $cn = $ecno->complete('200-236-'); # $cn = '200-236-6' $cd = $ecno->checkdigit('200-236-6'); # $cd = '6' $bn = $ecno->basenumber('200-236-6'); # $bn = '200-236-' DESCRIPTION
ALGORITHM 1. From left to right all digits are multiplied with their position in the sequence. 2. The sum of all products is computed. 3. The sum of step 2 is taken modulo 11. The checkdigit is the last digit of the result. 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, http://en.wikipedia.org/wiki/EC-No. perl v5.10.0 2008-05-17 CheckDigits::M11_017(3pm)

Check Out this Related Man Page

CheckDigits::M23_002(3pm)				User Contributed Perl Documentation				 CheckDigits::M23_002(3pm)

NAME
CheckDigits::M23_002 - compute check digits for VAT Registration Number (IE) SYNOPSIS
use Algorithm::CheckDigits; $dni = CheckDigits('ustid_ie'); if ($dni->is_valid('8473625E')) { # do something } $cn = $dni->complete('8473625'); # $cn = '8473625E' $cd = $dni->checkdigit('8473625E'); # $cd = 'E' $bn = $dni->basenumber('8473625E'); # $bn = '8473625' DESCRIPTION
ALGORITHM 1. Beginning right all digits are weighted with their position in the number (i.e. the number left from the check digit is multiplied with 2, the next with 3 and so on). 2. All products are added. 3. The check digit is the sum from step 2 modulo 23. This number is expressed as the corresponding letter from the alphabet where A-V correspond to 1-22 and W stands for check digit 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. perl v5.10.0 2008-05-17 CheckDigits::M23_002(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command meaning.

what does it mean set linesize 200; set linesize 2000; i am spooling the data into a file .When i give 200 the size of file is 72MB. When i give 2000 its 720 MB.How do i know if i am getting all the data.......? (2 Replies)
Discussion started by: praveen.pinto
2 Replies

2. Shell Programming and Scripting

Write a shell program to find the sum of alternate digits in a given 5-digit number

Hi Can any one please post the answer for the above program.................. (4 Replies)
Discussion started by: banta
4 Replies

3. Shell Programming and Scripting

AWK greater than 200

I need to grep out usernames with UID's greater than 200 out of the /etc/passwd file for a server migration. It is the third field however I am not sure to to accomplish this. I tried to search the forums but did not seem to find an answer (might have over looked it). Any help would be... (2 Replies)
Discussion started by: insania
2 Replies

4. UNIX for Dummies Questions & Answers

Copying & moving en masse

I'm new to UNIX and have got some of the basics down, but I've got a puzzle I'm having difficulty working out. :confused: Scenario: Have FILE_A.JPG in DIR_A Need to copy FILE_A 200 times and rename it 200 different names. List of 200 names in NAME_FILE.TXT After renaming 200 files,... (4 Replies)
Discussion started by: anekab
4 Replies

5. Shell Programming and Scripting

Export into a single cell of excel sheet...

The awk is giving below output: SELECT divrel.child_org_idn org_main_idn NULL ( VARCHAR(200)) div_nam_2 NULL ( VARCHAR(200)) div_nam_3 NULL ( VARCHAR(200)) div_nam_4 NULL ( VARCHAR(200)) div_nam_5 NULL ( VARCHAR(200)) div_nam_6 NULL ( VARCHAR(200)) div_nam_7 ... (2 Replies)
Discussion started by: goutam_igate
2 Replies

6. BSD

Two gateways

I have a web server running FreeBSD 7.2, i have configured two NICs in the following way: fxp0: 200.14.xxx.254 sk0: 200.12.xxx.4 gateway: 200.14.xxx.1 both ip addresses are public but only those requests to fxp0 are successful. I have tried configuring nat and binat in sk0 but it... (4 Replies)
Discussion started by: edgarvm
4 Replies

7. HP-UX

Logins command exit status is 236 not 0

I have noticed that on version 11.23 I get exit status 236 from the following command: logins -oxl root ; echo $? > 236 However on 11.31 I get the expected code 0 logins -oxl root ; echo $? > 0 The output is correct for both versions and contains no error data. Can anyone explain... (2 Replies)
Discussion started by: parkea2
2 Replies

8. Shell Programming and Scripting

help: single digits inflated to 2 digits

Hi Folks Probably an easy one here but how do I get a sequence to get used as mentioned. For example in the following I want to automatically create files that have a 2 digit number at the end of their names: m@pyhead:~$ for x in $(seq 00 10); do touch file_$x; done m@pyhead:~$ ls file*... (2 Replies)
Discussion started by: amadain
2 Replies

9. Shell Programming and Scripting

Aggregated points

Combine points of specific key (a1) based on user defined size (lets say 200 in this example). so a1 191 and 191+200 and sum of all the values (4th column) and vice versa... Thanx a bunch! a1 191 201 1 a1 201 211 2 a1 211 221 1 a1 ....... .... a2......... ........ (7 Replies)
Discussion started by: quincyjones
7 Replies

10. Shell Programming and Scripting

Extract data based on position

The file has record length 200. And i have 100 search strings which are ten digits of character from 1 to 10 characters all of them are unique, they need to searched in a file. Please help me to pull the records based on position (say from 1-10). test data 1FAHP2DW0BG115206RASHEED ... (6 Replies)
Discussion started by: zooby
6 Replies

11. Shell Programming and Scripting

Decimal places

i need to multiplay a number with 1.00.. so that the output should contain two decimal places at end.. for example... 236 * 1.00 = 236.00 245.8 * 1.00 = 245.80 but when i perform multiplication it shows output as. 236 245.8 can anyone help me to get the actual output of... (11 Replies)
Discussion started by: arunmanas
11 Replies

12. Shell Programming and Scripting

Remove multiple blanks

Hi, I have data as below And I want output as Thanks (5 Replies)
Discussion started by: Anjan1
5 Replies

13. UNIX for Advanced & Expert Users

Truss output interpretation

hi, anyone can help on this piece of truss output? 8094: 0.7028 write(4, 0x0043BE90, 236) = 236 8094: T S H \0\0\0EC020101\0\0\0\0\0\0\0\0\0 "02\0\0 303\0\0 I D 8094: \f %\0\0\0\0 2\0F67F\0\0\0\0 @06FFC99A ; 8094: L D6\0 303 8094: ... (6 Replies)
Discussion started by: ghostdog74
6 Replies

14. Shell Programming and Scripting

Check if 2 input values exists in a file

I have a file number.txt.I need to get 2 inputs from the terminal like a=100 and b=200.If a and b are there in the file,then check if a < b,print "less".If a is not there in the file,print "a is missing" or if b is not there in the file,print "b is missing". number.txt: 100 200 300 (2 Replies)
Discussion started by: aneeta13
2 Replies

15. UNIX for Dummies Questions & Answers

Sorting numerically considering both negative and positve numbers

Dear Experts, I have an IP file which looks like below ---- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 2.05 200 300 3.01 200 300 -5.06 I want an OP which looks like (decreasing numerically)-- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 3.01 200 300 2.05 200 300 -5.06 (2 Replies)
Discussion started by: Indra2011
2 Replies