Configuration files function

Configuration files function

Post by anonymou » Tue, 22 Feb 2005 07:47:22



Hi

I'm trying to make KSH functions using regexp that would handle
configuration file options write and read.

Configuration file is "windows" style .ini file. that is format like

[section 1]
variable1=value1
variable2=value2
variable3=value3

[section 2]
variable1=value1
variable4=value4

etc...
file can be what ever size with 0 to ? sections and variables.
values can be single value or list of values

write function uses parameters : <section> <variable> <value to write>
read function uses parameters : <section> <variable> <value to write>

Has anyone seen sample for this ?

 
 
 

1. standard library of function for parsing configuration files

Hi,

The Microsoft Win32 API provides a set of standard calls for parsing a Windows
.ini type configuration file:  GetPrivateProfileInt, GetPrivateProfileSection,
etc.  Is there something similar under Linux?  As part of glibc or another 3rd
party library?  THere are a lot of files in /etc and I'm hoping everyone
hasn't continually rolled their own libraries.  Something in C or C++ would be
nice.  Thanks.

Jeff

--
Jeff McWilliams - Advanced Development Engineer, ACE Technologies

2. Are these upgrades suitable?

3. Configuration that enable multiple icq clients file transferring function

4. Getting the right dynamic IP address with dip

5. function, function...who's got the function?

6. DIP: Can't SEND spaces

7. STYLE: better to have one-file-many-functions or many-files-holding-one-function

8. Madge Smart 16/4 AT Plus Token Ring card

9. RFC: bare pci configuration access functions ?

10. Help on function keys configuration

11. configuration dns client. and cache functions.

12. Help on function keys configuration