Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fstrcmpi(3) [debian man page]

fstrcmpi(3)						     Library Functions Manual						       fstrcmpi(3)

NAME
fstrcmpi - fuzzy comparison of two strings SYNOPSIS
#include <fstrcmp.h> #define FSTRCMPI_IDENTICAL #define FSTRCMPI_THRESHOLD #define FSTRCMPI_ERROR int fstrcmpi(const char *string1, const char *string2); DESCRIPTION
The fstrcmpi() function compares the two strings, string1 and string2. RETURN VALUE
The fstrcmpi function returns an int value between 0 and FSTRCMPI_IDENTICAL. A value of 0 means the strings are utterly un-alike. A value of FSTRCMPI_IDENTICAL means the strings are identical. A value of more than FSTRCMPI_THRESHOLD (it lies between 0 and FSTRCMPI_IDENTICAL) would be considered "similar" by most people. A value of FSTRCMPI_ERROR (always negative) indicates a malloc(3) failure. SEE ALSO
fstrcasecmpi(3) compare two strings ignoring case fstrcmp(3) fuzzy comparison of two strings fmemcmp(3) fuzzy comparison of two memory areas strcmp(3) compare two strings COPYRIGHT
fstrcmp version 0.4 Copyright (C) 2009 Peter Miller Peter Miller <pmiller@opensource.org.au> The comparison code is derived from the fuzzy comparison functions in GNU Gettext 0.17. The GNU Gettext comparison functions were, in turn, derived from GNU Diff 2.7. Copyright (C) 1988-2009 Free Software Foundation fstrcmpi(3)

Check Out this Related Man Page

fstrcasecmp(3)						     Library Functions Manual						    fstrcasecmp(3)

NAME
fstrcasecmp - fuzzy comparison of two strings ignoring case SYNOPSIS
#include <fstrcmp.h> #define FSTRCMP_IDENTICAL #define FSTRCMP_THRESHOLD #define FSTRCMP_ERROR double fstrcasecmp(const char *string1, const char *string2); DESCRIPTION
The fstrcmp() function compares the two strings, string1 and string2, ignoring case. RETURN VALUE
The fstrcasecmp function returns a floating point value between 0.0 and FSTRCMP_IDENTICAL. A value of 0.0 means the strings are utterly un-alike. A value of FSTRCMP_IDENTICAL means the strings are identical. A value of more than FSTRCMP_THRESHOLD (it lies between 0.0 and FSTRCMP_IDENTICAL) would be considered "similar" by most people. A value of FSTRCMP_ERROR (always negative) indicates a malloc(3) failure. SEE ALSO
fmemcmp(3) fuzzy comparison of two memory areas fstrcasecmpi(3) fuzzy comparison of two strings ignoring case fstrcmp(3) fuzzy comparison of two strings strcasecmp(3) compare two strings ignoring case COPYRIGHT
fstrcmp version 0.4 Copyright (C) 2009 Peter Miller Peter Miller <pmiller@opensource.org.au> The comparison code is derived from the fuzzy comparison functions in GNU Gettext 0.17. The GNU Gettext comparison functions were, in turn, derived from GNU Diff 2.7. Copyright (C) 1988-2009 Free Software Foundation fstrcasecmp(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparison problem

Hi, Is there any limitation on the no of characters to be compared using the if statement in Unix. We had an issue while comparing the following two nos. var1=20051031222900 & var2=20051101003545. The last six dgits are the time stamp for a day. The if statement is like this: if then move... (8 Replies)
Discussion started by: ranj@chn
8 Replies

2. Shell Programming and Scripting

Charater comparison

I have two files. Each file has one line with 2500 charaters in it and both lines should be the same, but thay are not. I need to compare the two lines and find where the differences are. So what I need to do is compare each character one at a time to find out whats different. (4 Replies)
Discussion started by: Tornado
4 Replies

3. Shell Programming and Scripting

string comparison

Hello experts, (tcsh shell) Quite new to shell scripting... I have got a file with a single word on each line. Want to be able to make a comparison such that i can read pairs of words that are ROT13 to each other. Also, i would like to print the pairs to another file. Any help... (5 Replies)
Discussion started by: Jatsui
5 Replies

4. UNIX for Dummies Questions & Answers

file comparison...help needed.

Hello all, Can anyone help me with this. There are two files and I have to match the second file records with that of first and if matched, print the output in two fies, one containing the matched records and other containing the rest. Here is the example. File1 "111",erter,"00000", ... (4 Replies)
Discussion started by: er_ashu
4 Replies

5. Shell Programming and Scripting

File structure comparison

To test server migration, we need to compare files under a directory in source and target servers. I need to verify if the below two directories on two servers are identical (i.e., contains same directories and files with same size. They may have multiple level sub-directories) ... (3 Replies)
Discussion started by: krishmaths
3 Replies

6. Shell Programming and Scripting

file comparison

hi I have 2 files to comapre ,in file a sible column it is numbers,in file b2 numbers and other values with coma separated. i want compare numbers in file a with file b,and the out put put should be in C with numbers in both file a and b along with other columns of file b. i used folowing... (7 Replies)
Discussion started by: satish.res
7 Replies

7. UNIX for Dummies Questions & Answers

Timestamp comparison

How do I compare 2 timestamps (ie... if 2008-02-13 10:48:58.502075 gt 2008-12-15 16:00:00.000000) (4 Replies)
Discussion started by: auzark
4 Replies

8. Shell Programming and Scripting

problem in string comparison in shell programming

Hello, was just wondering how to compare strings in unix? I mean as in C there is a function strcmp() in string.h, is there any function in unix for that? I tried using if and all such variations but didn't succeed. Any help would be appreciated. Thanks in advance :) (9 Replies)
Discussion started by: salman4u
9 Replies

9. Shell Programming and Scripting

set boolean after comparison

Hi there, Sorry if the title doesn't mean much to you, I don't know how to sum up my pb in one line. I'd like to set a value to 0 or 1 depending on the result of a comparison. Here's what I do: supernova:~# a= supernova:~# isempty=$(] && echo 1 || echo 0) supernova:~# echo $isempty 1... (4 Replies)
Discussion started by: chebarbudo
4 Replies

10. Shell Programming and Scripting

variable comparison

Hello, I am trying to compare two variables, which both have a word stored in it. The code I am using is. Please tell me which one of these is correct.Or please tell me the correct syntax. Thankyou if then if then if then if then if then None of them seems to work... (3 Replies)
Discussion started by: Freakhan
3 Replies

11. Post Here to Contact Site Administrators and Moderators

How to turn of "clouds"

How do I turn off the "clouds" which appear at the bottom of the screen? Currently I have a "tag cloud" which serves no useful purpose except to make future Google searches fuzzy. (3 Replies)
Discussion started by: methyl
3 Replies

12. Shell Programming and Scripting

Case insensitive comparison of strings

Hi All, In one shell script I have In variable "i" I am getting a full path of a file. Now I want to compare something like -- upper(*Nav*)) I dont want to do like below because in each CASE statement I doing so many operations. Please guide me. Thanks in advance... (4 Replies)
Discussion started by: vishalaksha
4 Replies

13. UNIX for Dummies Questions & Answers

comparison

hi guys i need a program that can compare a value read from a com-port and one from the terminal. can somebody help me??? using linux kernel 2.6.14-M5 can only use standard function in sh and bash... (5 Replies)
Discussion started by: metal005
5 Replies

14. Shell Programming and Scripting

Looping for comparison

Hi friends,,, for comparison purpose i need to use nested loop....pls give one example..as I have confusion while file reading..my code looks somewhat like this.. awk 'FNR==NR{ { getline < "file.dat" ; la=$1 } { getline < "file.dat" ; lo=$2 } { getline < "file.dat" ;... (4 Replies)
Discussion started by: Akshay Hegde
4 Replies

15. Shell Programming and Scripting

Search a text and return the text from file

Hi I have a set of input strings in a pattern as given below string1 string2 string3 string4 string5 I need to search this sequence of strings from a file in such a way that the first two strings (string1 and string2) and last two strings (string4 and string5) should match with the... (8 Replies)
Discussion started by: my_Perl
8 Replies