Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

strneqvcmp(3) [centos man page]

strneqvcmp(3)							Programmer's Manual						     strneqvcmp(3)

strneqvcmp - compare two strings with an equivalence mapping SYNOPSIS
#include <your-opts.h> cc [...] -o outfile infile.c -lopts [...] int strneqvcmp(char const* str1, char const* str2, int ct); DESCRIPTION
Using a character mapping, two strings are compared for "equivalence". Each input character is mapped to a comparison character and the mapped-to characters are compared for the two NUL terminated input strings. The comparison is limited to ct bytes. This function name is mapped to option_strneqvcmp so as to not conflict with the POSIX name space. str1 first string str2 second string ct compare length RETURN VALUE
the difference between two differing characters ERRORS
none checked. Caller responsible for seg faults. SEE ALSO
The info documentation for the -lopts library. ao_string_tokenize(3), configFileLoad(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadLine(3), optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3), strtransform(3), 2014-06-10 strneqvcmp(3)

Check Out this Related Man Page

optionProcess(3)						Programmer's Manual						  optionProcess(3)

optionProcess - this is the main option processing routine SYNOPSIS
#include <your-opts.h> cc [...] -o outfile infile.c -lopts [...] int optionProcess(tOptions* opts, int a_ct, char** a_v); DESCRIPTION
This is the main entry point for processing options. It is intended that this procedure be called once at the beginning of the execution of a program. Depending on options selected earlier, it is sometimes necessary to stop and restart option processing, or to select com- pletely different sets of options. This can be done easily, but you generally do not want to do this. The number of arguments processed always includes the program name. If one of the arguments is "--", then it is counted and the processing stops. If an error was encountered and errors are to be tolerated, then the returned value is the index of the argument causing the error. A hyphen by itself ("-") will also cause processing to stop and will not be counted among the processed arguments. A hyphen by itself is treated as an operand. Encountering an operand stops option processing. opts program options descriptor a_ct program arg count a_v program arg vector RETURN VALUE
the count of the arguments processed ERRORS
Errors will cause diagnostics to be printed. exit(3) may or may not be called. It depends upon whether or not the options were generated with the "allow-errors" attribute, or if the ERRSKIP_OPTERR or ERRSTOP_OPTERR macros were invoked. SEE ALSO
The info documentation for the -lopts library. ao_string_tokenize(3), configFileLoad(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadLine(3), optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3), 2014-06-10 optionProcess(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. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies

3. Programming

Reg: strncpy function

Hi All, Please clear the following doubt. int main() { char str1; char str2 = "HelloWorld"; int len = strlen(str2); strncpy(str1, str2, len); str1 = '\0'; printf("%s", str1); } In the above program i'm initializing the 10th byte of str1 to null. what will happen to the memory of... (13 Replies)
Discussion started by: arunviswanath
13 Replies

4. Shell Programming and Scripting


Hi, i want to match a string using perl that has got 5 pluses(+++++). i am using a function for this. $str1="+++++"; check($str1,"\\+"); sub check{ $str1=$_; $str2=$_; if($str1=~m/^$str2{5}$/){ print "Correct.\n"; }else{ print "Wrong..\n"; ... (6 Replies)
Discussion started by: deepakpv
6 Replies

5. Shell Programming and Scripting

cut First charecter in any string

I wannt to cut first char of any string. str=A2465443 out put will be. str1=A str2=2465443. I tried str2=${?%srt} str1=${str#$str2} it is not working. (6 Replies)
Discussion started by: rinku
6 Replies

6. Shell Programming and Scripting

how to handle variables in sed

while read line do str1=`grep 'customernumberR11' file1 | cut -c 20-21` str2=`grep 'newnumberR11' file1 | cut -c 15-16` if ; then sed -e "s/newnumberR11/ s/$str2/\$str1/g" $line fi done < file1 (4 Replies)
Discussion started by: LAKSHMI NARAYAN
4 Replies

7. UNIX for Dummies Questions & Answers

Merge two strings not from files

str1="this oracle data base record" str2="one two three four five" Output: this one oracle two data three base four record five str1 and str2 have the same column but they are not fixed columns. I can do it with "paste" but I do not want to create file everytime the script runs from... (2 Replies)
Discussion started by: buddyme
2 Replies

8. UNIX for Advanced & Expert Users

can awk built-in "match" be exact??

hello everybody, as explained in the title, here is what I want: str1="name1 name2 name3" str2="name1" str3="name" I know that match(str1,str2) will return 1, but I want that match(str1,str3) returns 0 (when it also returns 1...) Is there a way to get that exact matching process done... (6 Replies)
Discussion started by: farphe
6 Replies

9. Shell Programming and Scripting

script op is different

Consider the following script.. str1="Good" str2="Bad" str3= echo $? echo $? echo $? echo $? echo $? echo $? When I executed this, the o/p is (2 Replies)
Discussion started by: lipun4u
2 Replies

10. UNIX for Dummies Questions & Answers

character-by-character comparison of strings

This might be a dummy question, but is there a command in UNIX that compare two strings character-by-character and display the difference? ---------- Post updated at 11:25 AM ---------- Previous update was at 10:32 AM ---------- Or probably what I'm looking is how to break a string into... (3 Replies)
Discussion started by: Orbix
3 Replies

11. Shell Programming and Scripting

String comparison problem

Hi, can someone please help me!!! urgent! I have a strange issue here. I grep for 2 strings from a txt files and compare the string value. Though the string values are the same, they are compared as different values. Please help Case-1 -------- Here I grep for 2 different field values... (3 Replies)
Discussion started by: vani123
3 Replies

12. Shell Programming and Scripting

Reading from standard input

So, I am new to shell scripting and have a few problems. I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
Discussion started by: Bungkai
7 Replies

13. Shell Programming and Scripting

Comparing Strings in ksh88

Hi I tried the following string comparison script in Ksh88 #!/bin/ksh str1='aC' str2='ABC' if then echo "Equal" else echo "Not Equal" fi Though str1 and str2 are not equal the script output says Equal . Please correct me Thanks (2 Replies)
Discussion started by: smile689
2 Replies

14. Shell Programming and Scripting

Appending lines in a file

Hello, I have a file like: str1,"HEX"H,(39),info str2,"HEX"H,(854548),info str3,"HEX"H,'BGTOUR',info str4,"HEX"H,(534322),info str1,"HEX"H,,info str3,"HEX"H,'Landing',info str4,"HEX"H,'BG',info str1,"HEX"H,,info str3,"HEX"H,'Ay',info str1,"HEX"H,(27),info str2,"HEX"H,(854548),info... (2 Replies)
Discussion started by: apenkov
2 Replies

15. Shell Programming and Scripting

String regex comparisons

Here is the sample code: str1="abccccc" str2="abc?" if ]; then echo "same string" else echo "different string" fi Given that ? implies 0 or 1 match of preceding character, I was expecting the output to be "different string", but I am seeing "same string". Am I not using the... (3 Replies)
Discussion started by: Rameshck
3 Replies

Featured Tech Videos