Let's say I have a simple config file that my c program needs to read/parse.
Let's say it looks a little bit like this:
#Some comment key1=data1 key2=data2
Is there a standard c lib that I can use instead of writing my own parser?
Thanks Johan
Note: Today I have my own little parser, but there must be some standard libs that solves this simple problem.
conf file in Linux, first locate it in the file system. Most often, the dhclient. conf file will be located in the /etc or /etc/DHCP directory. Once you find the file, open it with your favorite command-line editor.
The directory system categorizes all installed files. All configuration files are in /etc , all binary files are in /bin or /usr/bin or /usr/local/bin .
A CONF file is a configuration or "config" file used on Unix and Linux based systems. It stores settings used to configure system processes and applications. CONF files are similar to . CFG files found on Windows and Macintosh systems.
libconfig but it does quite more than what you're asking
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With