On Sunday 02 May 2010 10:52:57 Berry, Randall wrote: > I have an application I am working on that requires a config file in > the users home directory. This file is .asoundrc (alsa sound config) I > need to write a script that does 5 things.
Assuming the format is the same format used in /etc/asound.conf, what you need is known as a "parser" and you need one which can be invoked from bash. > I've gotten all but step 3 and step 4 to work so far but I don't know > how to tell bash to check for the needed parameters in an existing file > and if not there append them. There is a project for writing configuration file parsers <http://augeas.net/> but it does not seem to include one for .asoundrc. A quick Google search turned up nothing. The functionality you need is probably available through the Alsa library, but I suspect this would require some C programming. You might find more helpful advice in the pages of the Alsa project <http://www.alsa-project.org/main/index.php/Main_Page> including where to ask the above question again. Davide Bolcioni -- There is no place like /home. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel