11-13-2008
Thanks for the above, however what if both strings are variables (i.e $string1 and $string2).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can anyone define the following for me?
/etc/rc.c/init.d/iptables restart
Our resident "Geek" is giving away a prize if I can tell him what this means. (5 Replies)
Discussion started by: txyzzy
5 Replies
2. HP-UX
Hi I need to check if the following patches are installed in a HP-UX machine "GOLDQPK11i, which in turn includes both GOLDAPPS11i and
GLODBASE11i
How can I go about doing it, am still a struggling sys admin!
Saw this command showrev -p but command not found in the machine thou!
Thanks... (3 Replies)
Discussion started by: gelbvonn
3 Replies
3. Solaris
Dear All,
I have created a UTF-8 database to store multi-lingual charcters. Below is the query from which i insert from Winsql (front-end third party database browser tool), the data gets inserted properly.
insert into a (no, lbl)
values (1, "Cliquez ici pour revenir Ã_ la recherche de... (2 Replies)
Discussion started by: lloydnwo
2 Replies
4. UNIX for Advanced & Expert Users
How do i remove single quotes(') from a file.
Can we use sed for it (2 Replies)
Discussion started by: kris01752
2 Replies
5. UNIX for Advanced & Expert Users
I have a csv file with a record size of greater than 2048.So when i try to open the file in VI..This is the error i get (test.csv" A line cannot be longer than 2048 characters)
Is there a way i can change this parameter to read a bigger line (2 Replies)
Discussion started by: kris01752
2 Replies
6. Shell Programming and Scripting
Hi
I'd like to cat, in linux, a file that holds special charcters, like "-->" and ">" and "]"
For example I have a file named test123.txt
it looks like this:
2008-09-11 00:27:01,496 -
< 0 > --> Start calculation of pattern , Pattern was split to pattern graphs
< 0 > System Tqls Optimizer... (5 Replies)
Discussion started by: liav
5 Replies
7. Solaris
Hi All
My Server is doing a very intense netowrk traffic operations and the cards are under very high pressure.
I need to call NETSTAT on the shell. Do you know whether this command, under high pressure, might have some impact on the server traffic or can I proceed without any problem? (2 Replies)
Discussion started by: manustone
2 Replies
8. UNIX for Dummies Questions & Answers
Find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (0 Replies)
Discussion started by: Phaneendra G
0 Replies
9. Homework & Coursework Questions
find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (1 Reply)
Discussion started by: Phaneendra G
1 Replies
10. Shell Programming and Scripting
Hellow:
I have the following data.
id1 xxx xxx xxx id1 xxxx xxx xxx
id2 xxx xxx xxx id2 xxxx xxx xxx id2
In my awk script which reads the file containing the above data I have the following code:
myline=<inputdata> which is shown above
What I am trying to find out is how may... (5 Replies)
Discussion started by: wincrazy
5 Replies
LEARN ABOUT DEBIAN
string::similarity
Similarity(3pm) User Contributed Perl Documentation Similarity(3pm)
NAME
String::Similarity - calculate the similarity of two strings
SYNOPSIS
use String::Similarity;
$similarity = similarity $string1, $string2;
$similarity = similarity $string1, $string2, $limit;
DESCRIPTION
$factor = similarity $string1, $string2, [$limit]
The "similarity"-function calculates the similarity index of its two arguments. A value of 0 means that the strings are entirely
different. A value of 1 means that the strings are identical. Everything else lies between 0 and 1 and describes the amount of
similarity between the strings.
It roughly works by looking at the smallest number of edits to change one string into the other.
You can add an optional argument $limit (default 0) that gives the minimum similarity the two strings must satisfy. "similarity" stops
analyzing the string as soon as the result drops below the given limit, in which case the result will be invalid but lower than the
given $limit. You can use this to speed up the common case of searching for the most similar string from a set by specifying the
maximum similarity found so far.
SEE ALSO
The basic algorithm is described in:
"An O(ND) Difference Algorithm and its Variations", Eugene Myers,
Algorithmica Vol. 1 No. 2, 1986, pp. 251-266;
see especially section 4.2, which describes the variation used below.
The basic algorithm was independently discovered as described in:
"Algorithms for Approximate String Matching", E. Ukkonen,
Information and Control Vol. 64, 1985, pp. 100-118.
AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/
(the underlying fstrcmp function was taken from gnu diffutils and
modified by Peter Miller <pmiller@agso.gov.au> and Marc Lehmann
<schmorp@schmorp.de>).
perl v5.14.2 2012-03-15 Similarity(3pm)