This is "how to parse a config file" question. Basically i have a text file (/etc/myconfig) that has all kind of settings. I need to read that file and search for the string:
wants_return=yes
once I locate that string I need to parse it and return only whatever it is after the equal sign. I've tried using a combinations of fgets and strtok but I'm getting confused here. in any case anyone knows a function that can perform this?
Code is appreciated.
thanks