Hi, all. First off, I'm new to Fabric and Python, so I apologize if this is something obvious that I'm doing wrong.
I'm writing a program to audit an XML config file on remote hosts. Specifically, I'm auditing the configuration file for Pidgin to ensure that chat logging is disabled. I'm attempting to use grep to find the relevant lines and sed to pull out the True/False bool. Here are the two relevant lines of code: imbool = sudo("grep '<pref name=\'log_ims\' type=\'bool\' value=\'[0|1]\'/>' " + configfile + " | sed 's/.* value=\'\([01]\)\'.*/\1/'") chatbool = sudo("grep '<pref name=\'log_chats\' type=\'bool\' value=\'[0|1]\'/>' " + configfile + " | sed 's/.* value=\'\([01]\)\'.*/\1/'") I've gone around and around trying to escape quotes in different ways, but none of them are working. I was told in the IRC channel that escaping quotes is problematic. I figured I'd make sure I'm not just missing something obvious before I figure out the Python way to do it (i.e., without grep and sed). Thanks! - Tim O'Guin _______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user