FreePBX bulk utils are really nice - its as simple as export, modify, upload.
But its painful whenever I need to make a change to all the Cisco Phone XML configs. If I wanted to changed the backlight to be Always On, For example, I would find the value I want to change then copy it. Then I would have to open each config seperately, find the line of code and paste over it carefully not to leave any syntax misconfig. Sometimes I have to do this for 30 phones. And then when Im done, I think of another value I want to tweak so i go back and do it all over again.
Is there a program anyone uses for this. It could be as simple as a search and replace tool that works ona group of files or something like that. If not maybe I will try to write my own tool for this and share it here, but Im sure others have a solution
It can handle anything that you throw at it just “escape” characters as needed(as in reserved characters). brush up on your bash usage of single-quotes double-quotes and regexes, everything is then essentially a one-liner
You could consider using php, python, perl, some other language you like…
No escaping needed.
Take a snippet like one of the answers and keep it in your toolbox, adjust as needed in the future. You change a few plain text variables rather than reinventing the wheel writing a new sed expression for every new change.
As James suggests, there is always one or more very complicated ways to skin a cat, choose your poison, I challenge that none could possibly be as simple and understandable as the “one-liner” I originally suggested