optionFileLoad(3) Programmer's Manual optionFileLoad(3)NAME
optionFileLoad - Load the locatable config files, in order
SYNOPSIS
#include <your-opts.h>
cc [...] -o outfile infile.c -lopts [...]
int optionFileLoad(tOptions* pOpts, char const* pzProg);
DESCRIPTION
This function looks in all the specified directories for a configuration file ("rc" file or "ini" file) and processes any found twice. The
first time through, they are processed in reverse order (last file first). At that time, only "immediate action" configurables are pro-
cessed. For example, if the last named file specifies not processing any more configuration files, then no more configuration files will
be processed. Such an option in the first named directory will have no effect.
Once the immediate action configurables have been handled, then the directories are handled in normal, forward order. In that way, later
config files can override the settings of earlier config files.
See the AutoOpts documentation for a thorough discussion of the config file format.
Configuration files not found or not decipherable are simply ignored.
pOpts program options descriptor
pzProg program name
RETURN VALUE
0 -> SUCCESS, -1 -> FAILURE
ERRORS
Returns the value, "-1" if the program options descriptor is out of date or indecipherable. Otherwise, the value "0" will always be
returned.
SEE ALSO
The info documentation for the -lopts library.
ao_string_tokenize(3), configFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadLine(3),
optionNextValue(3), optionOnlyUsage(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3),
optionVersion(3), pathfind(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),
2010-07-05 optionFileLoad(3)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)