06-03-2009
thanks for replying
Some entries for the zipcodes are 5 digit and some are 9 digit.
Im trying to find all zipcodes that are within a certain range that begin with a specificed range. ie 1234(0-9). My problem is that my current awk syntax does find my zips, however it can find that particular sequence anywhere within the a 9 digit zipcode. It find the 5 digit ones just fine. I hope that clears it up some.
nelson
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
i have a script to zip certain files. redirecting the successfully zipped files and unsuccessful files to seperate files.
i found unzipped file name in zipped file list.
i dont know why it happened.
and, some of the files are not zipped.
i checked the previllege also, even... (2 Replies)
Discussion started by: Arunprasad
2 Replies
2. Shell Programming and Scripting
Anyone can help for filter the uniq record for below example? Thank you very much
Input file
20090503011111|test|abc
20090503011112|tet1|abc|def
20090503011112|test1|bcd|def
20090503011131|abc|abc
20090503011131|bbc|bcd
20090503011152|bcd|abc
20090503011151|abc|abc... (8 Replies)
Discussion started by: bleach8578
8 Replies
3. Shell Programming and Scripting
Hi,
Suppose I have a csv file, each line look like this:
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY 92939-2222
How do I create two new columns at the end, one for state, one for zip.
So that the line is
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY... (2 Replies)
Discussion started by: grossgermany
2 Replies
4. UNIX for Dummies Questions & Answers
Hi friends
I am working in cygwin. Currently I am in root directory(C). I want to zip only the files from a diretory "A" to a new directory 1.zip in root directory C.
I am using the following command:
$: zip 1.zip A/*
but it is zipping the entire directory itself, But what I want is when... (4 Replies)
Discussion started by: ks_reddy
4 Replies
5. Shell Programming and Scripting
I want to filter 2nd column = 2 using awk
$ cat t
1 2
2 4
$ VAR=2
#variable worked in print
$ cat t | awk -v ID=$VAR ' { print ID}'
2
2
# but variable didn't work in awk filter
$ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies
6. Shell Programming and Scripting
Hi ,
I am having two files like this
FILE1
####################
input SI_TESTONLY_R_00;
input CE0_SE_INPUT_TESTONLY;
input CE0_TCLK_TESTONLY;
input SI_JTGCLOCKDR_JTAG_R_00;
input CE0_TCLK_JTGCLOCKDR_JTAG;
input CE0_SE_INPUT_JTGCLOCKDR_JTAG;
output SO_TESTONLY_R_00;
output... (2 Replies)
Discussion started by: jaita
2 Replies
7. Shell Programming and Scripting
Hi All,
I'm stuck with this issue when I try to display the searched string into a compressed file.
More exactly when I run this script
for f1 in $(find dir1 -type f -print); do gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}' | xargs -i sed -n {} $f1 ; done
returns... (3 Replies)
Discussion started by: gio1234
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I'm trying to combine two files which have 1 column in common and filter out rows I don't need.
File 1:
ID Start End Matched Coverage
1 1 254 1515 5.96
2 1 135 402 2.98
File 2 (has 2 rows per entry):
>1... (4 Replies)
Discussion started by: Yarinka
4 Replies
9. Shell Programming and Scripting
Not sure if this is the correct forum for this question. I have two files. file1.zip, file2
Input:
file1.zip
col1, col2 , col3
a , b , 0:0:0:0:0:c436:9346:d40b
x, y, 0:0:0:0:0:880:39f9:c9a7
m, n , 0:0:0:0:0:80c7:9161:fe00
file2.txt
col1
c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m09_001
CheckDigits::M09_001(3pm) User Contributed Perl Documentation CheckDigits::M09_001(3pm)
NAME
CheckDigits::M09_001 - compute check digits for Euro notes
SYNOPSIS
use Algorithm::CheckDigits;
$euro = CheckDigits('euronote');
if ($euro->is_valid('X07738250357')) {
# do something
}
$cn = $euro->complete('X0773825035'); # $cn = 'X07738250357'
$cd = $euro->checkdigit('X07738250357'); # $cd = '7'
$bn = $euro->basenumber('X07738250357'); # $bn = 'X0773825035'
DESCRIPTION
ALGORITHM
1. Letters are replaced with their position in the alphabet ('A' = 1, ...).
2. The total of the digits of all numbers is computed.
3. This sum is taken modulo 9.
4. The check digit is the difference between 8 and the number of step 3.
To validate the last digit of the total of the digits of all numbers inclusive check digit must be 8.
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.
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::M09_001(3pm)