Hi Folks !!!!!!!!!!!!!!!!!!!
My Requirement is.............
i have a input file:
501,501.chan
502,502.anand
503,503.biji
504,504.raja
505,505.chan
506,506.anand
507,507.chan
and my o/p should be
chan->3
i.e. the word which occurs maximum number of times in a file should be... (5 Replies)
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,
I just need to check whether number of digits in a phone number is 10 or not. If I am not wrong regex will be: {9}
I have to use this inside nawk as this is a small portion of a big program.
nawk '
BEGIN { RS="";FS=";";
regex="{9}";
}
{
for (i=1;i<=NF;i++) {
if... (6 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)
Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18... (2 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 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)
example:
i have the following text file...
i am very tired.
i am busy
i am hungry
i have to find the number of occurence of a particular word 'am' from the text file.. can any one give the shell script for it (34 Replies)
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m11_011
CheckDigits::M11_011(3pm) User Contributed Perl Documentation CheckDigits::M11_011(3pm)NAME
CheckDigits::M11_011 - compute check digits for VAT Registration Number (NL)
SYNOPSIS
use Algorithm::CheckDigits;
$ustid = CheckDigits('ustid_nl');
if ($ustid->is_valid('123456782')) {
# do something
}
if ($ustid->is_valid('123456782B04')) {
# do something
}
$cn = $ustid->complete('12345678');
# $cn = '123456782'
$cn = $ustid->complete('12345678.B04');
# $cn = '123456782B04'
$cd = $ustid->checkdigit('123456782');
# $cd = '2'
$cd = $ustid->checkdigit('123456782B04');
# $cd = '2'
$bn = $ustid->basenumber('123456782');
# $bn = '12345678';
$bn = $ustid->basenumber('123456782B04');
# $bn = '12345678.B04';
DESCRIPTION
This VATRN has 12 "digits", the third last must be a B, the fourth last is the checkdigit. I don't know anything about the meaning of the
last two digits.
You may use the whole VATRN or only the first eight digits to compute the checkdigit with this module.
ALGORITHM
1. Beginning right with the digit before the checkdigit all digits are weighted with their position. I.e. the digit before the checkdigit
is multiplied with 2, the next with 3 and so on.
2. The weighted digits are added.
3. The sum from step 2 is taken modulo 11.
4. If the sum from step 3 is 10, the number is discarded.
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.
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de,
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
COPYRIGHT AND LICENSE
Copyright 2004,2005 by Mathias Weidner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2008-05-17 CheckDigits::M11_011(3pm)