Hi
I am using the following command to look for anything other than
"0000" in a comma seperated file on 11th field.
Note: I am looking for "0000" including the double quotes.
This is showing incorrect result.
Help is appreciated
I have a .csv file with columns. In column I like to find which rows contain a certain pattern. That is, my column is:
CNR
CP
CSN
CTC
EF.DB.U
CTC.A
D.DB
Here, I like to do one thing with EF.DB.U and another with all other. So my question is; how should my if... (3 Replies)
Hi all
i have a directory where it has files as shown below.Using find command how can i delete files which were modified more than 20 days ago and having the pattern jnhld15231 or jnhld15232.
find ./ -name "jnhld15231^" -type f -mtime +20 -exec rm {} \;
find ./ -name "jnhld15232^" -type f... (2 Replies)
I need assistance with following requirement, I am new to Unix.
I want to do the following task but stuck with file creation date(sysdate)
Following is the requirement
I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Hi
I've to remove the files which has the following file pattern in path /home/etc/logs
fnm_HST_date1
fnm_hst_date1
fnm_HST_date2
I've used the following code to to remove the files having file names like "HST" .
#!/usr/bin/ksh
set -x
file_path=/home/etc/logs
file_nm=HST
find... (2 Replies)
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Hi
I am using awk to find the pattern from the file, but it is not displaying anything. Probably I am missing some syntax in expression.
FILE
xxxx.Merge.exchMon.BY.qTime 120 read
xxxx.Merge.exchMon.BY.qStart 09:55 read... (9 Replies)
Discussion started by: sdosanjh
9 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)