How is it possible under UNIX to restrain the number of digits of the PID number?
For instance, we have a product that generates a PID of 7 digits, and we would like to have only 6 digits maximum instead for the PID.
Thank you for your help. (1 Reply)
Hi all
Can anybody suggest me, how to get the count of digits in a word
I tried
WORD=abcd1234
echo $WORD | grep -oE ] | wc -l
4
It works in bash command line, but not in scripts :mad: (12 Replies)
Hi All,
I have a file of decimal numbers,
cat file1.txt
1.1382666907
1.2603107334
1.6118799297
24.4995857056
494.7632588468
560.7633734425
.....
I want to see the output as only 7 digits after decimal (5 Replies)
please help me write a perl program to find the difference of 1 and zeros of a 6 digit binary number.
eg If input is 111100 expected output +2
if input is 000011 expected output -2
input is 000111 expected output 0 (2 Replies)
HI all,
I have output of something like this:
crab: ExitCodes Summary
>>>>>>>>> 12 Jobs with Wrapper Exit Code : 50117
List of jobs: 1-12
See https:///twiki/something/ for Exit Code meaning
crab: ExitCodes Summary
>>>>>>>>> 5 Jobs with Wrapper Exit Code : 8001
List of... (20 Replies)
Hi,
Can anyone suggest me for the below steps.
Here the index files is nothing but a text file and In index file there are n number of pdf files.
Step 0 check out if this is for A(index file) or B(index file)
1. Read the first line of the original index file
2. Read the 9th character... (1 Reply)
Discussion started by: pavand
1 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m97_002
CheckDigits::M97_002(3pm) User Contributed Perl Documentation CheckDigits::M97_002(3pm)NAME
CheckDigits::M97_002 - compute check digits for International Bank Account Number (IBAN)
SYNOPSIS
use Algorithm::CheckDigits;
$iban = CheckDigits('iban');
if ($iban->is_valid('DE88 2008 0000 09703 7570 0')) {
# do something
}
$cn = $iban->complete('DE00 2008 0000 09703 7570 0');
# $cn = 'DE88 2008 0000 09703 7570 0'
$cd = $iban->checkdigit('DE88 2008 0000 09703 7570 0');
# $cd = '88'
$bn = $iban->basenumber('DE88 2008 0000 09703 7570 0');
# $bn = 'DE00 2008 0000 09703 7570 0'
DESCRIPTION
ALGORITHM
0 The IBAN number must be prepared. The first two letters and the checksum will be moved to the right end. The letters are substituted
according to the substitute table and the checksum is set to '00'.
1 The whole number is taken modulo 97.
2 The checksum is difference between 98 and the sum of step 2.
3 If the checksum is smaller then 10, a leading zero will be prepended.
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 checkdigits of $number if $number has a valid check digit.
Return '' otherwise.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
THANKS
Detlef Pilzecker pointed out to me that there may be more letters as the first two in an IBAN number. He also made me aware of a faster
method to compute the check number than using Math::BigInt.
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de, www.sic.ch/en/tkicch_home/tkicch_standardization/
tkicch_financialinstitutions_ibanipi.htm.
perl v5.10.0 2008-11-30 CheckDigits::M97_002(3pm)