On Wed, 2004-07-28 at 17:56, Neal D. Becker wrote:
Neal D. Becker wrote:
> Yes, here's the linux registry topic again. This project looks
> interesting. Any comments?
>
>
http://registry.sourceforge.net/
>
>
One motivation that I didn't hear anyone mention:
It is difficult to add entries/edit a flat file.
^^^Bingo !!! Somebody else hits
the nail on the head
Hence the need for "A COMMON API FOR MANIPULATING TEXT IN FLAT FILES"
I've written a utility in plain'Ol C. Its got two functions for reading
and writing flat file config files and a utility that uses them. I'm not
suggesting this become a standard, but something like it should exist in
the core libs??
This is the same type of code I see done over and over again because its
missing from the core API for Unix.
My util....
********
[root@localhost onsight-utils]# readwriteconfig
readwriteconfig -r filename variable
readwriteconfig -w filename variable=value
Examples:
readwriteconfig -w /etc/sysconfig/networking/profiles/default/ifcfg-eth0
IPADDR=192.168.1.113
Writing will return a single character A=appended C=Changed N=File to large.
Reading will return the variables value only or nothing if the string is not found
[root@localhost onsight-utils]#