02-26-2015
Not sure if you post the complete script? I am not seeing closing loops any.
Another quick check is, you have zero padded "start_day" in file but you are searching for single digit.
Second check is, var+=, I don't think is a shells specific syntax.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to extract data from logs for a mentioned date range..Its quite urgent can anyone help me out with it..its to be written in unix..just thought its better to specify.. (4 Replies)
Discussion started by: sankasu
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
we have file name appended by date in yymmdd format .. ex: abc090101.dat
I need to copy all the files between abc090101 to abc090331..
could you plz help me..
Thanks. (1 Reply)
Discussion started by: kolariya4u
1 Replies
3. Shell Programming and Scripting
Hi,
I have following requirement. Pls suggest.
To search a string in a file which is combination of character and number(always 9 digit, but numeric). if found then caputure the exit return code as 0 else 1 , if 0 then next job can be triggerd. If exit code is 1, should return a failure... (10 Replies)
Discussion started by: zooby
10 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to do the following:
grep -l <pattern> <files to be searched for>
In <files to be searched for> , all files should of some specific date like "Apr 8" not all files in current directory. I just to search within files Apr 8 files so that it won't search in entire list of... (2 Replies)
Discussion started by: apjneeraj
2 Replies
5. Shell Programming and Scripting
Hi,
Currently I am working on a script to automate the process of converting the log file from binary into text format. To achieve this, partly I am depending on my application’s utility for this conversion and the rest I am relying on shell commands to search for directory, locate the file and... (5 Replies)
Discussion started by: svajhala
5 Replies
6. Shell Programming and Scripting
Hi all,
I have 2 files, One file contain data like this
FHIT
CS
CHRM1
PDE3A
PDE3B
HSP90AA1
PTK2
HTR1A
ESR1
PARP1
PLA2G1B
These names are mentioned in the second file(Please see attached second file) as
# Drug_Target_X_Gene_Name:(Where X can be any number (1-1000) (1 Reply)
Discussion started by: manigrover
1 Replies
7. Shell Programming and Scripting
Hi All, I will need an help with respect to replacing a range of columns on a non-delimited file using a particular string pattern.
Say file input is
MYNUMBERD000000-BAN CHUE INSNTS ** N+
MYAREDSDD000000+BAN CHUE INSNTS ** N+
MYDERFFFSD00000-GIR PENT - ACH ** ... (5 Replies)
Discussion started by: navojit dutta
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Discussion started by: karthikprakash
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a log file containing below data
12/3/14 12:43:59 AM WIT |Performance threshold: elapsed time = 3152... (5 Replies)
Discussion started by: csm231
5 Replies
10. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m07_001
CheckDigits::M07_001(3pm) User Contributed Perl Documentation CheckDigits::M07_001(3pm)
NAME
CheckDigits::M07_001 - compute check digits modulo 7 method 1
SYNOPSIS
use Algorithm::CheckDigits;
$m001 = CheckDigits('m001');
if ($m001->is_valid('1234567892')) {
# do something
}
$cn = $m001->complete('123456789'); # $cn = '1234567892'
$cd = $m001->checkdigit('1234567892'); # $cd = '2'
$bn = $m001->basenumber('1234567892'); # $bn = '123456789'
DESCRIPTION
ALGORITHM
1. All digits are added.
2. All digits at even positions are added.
3. The sum of step 1 and 2 is taken modulo 7.
4. This is the check digit.
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 undef if $number does not consist solely of digits.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return undef otherwise.
checkdigit($number)
Returns the check digit belonging to $number or undef if $number does not consist solely of digits.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, www.pruefziffernberechnung.de.
perl v5.10.0 2008-05-17 CheckDigits::M07_001(3pm)