I'm writing a script to change on the fly the firefox home page through a text variable:sed -i 's|\(browser.startup.homepage,\) \(.*\)|\1 $ddrs|' /home/max/.mozilla/firefox/*.default/prefs.jsI need an help on bypassing the issue of expanding the $ddrs variable inside the sed single quote statement.
Help on edit a sed statement
sed;quoting;variable
FOUND A SOLUTION BY MYSELFInstead of insist in something cool as replace a targeted string inside a line I've  opted to replace the entire line, so:First I've put the urls.txt file in the ~/.mozilla/firefox/*.default/ directory.Then I've wrote the follow code at the very begin of the /usr/lib/firefox/firefox.sh file:ddrs=$(shuf -n1 ~/.mozilla/firefox/*.default/urls.txt)nwli=user_pref(\browser.startup.homepage\, $ddrs);sed -i /browser.startup.homepage/c\\$nwli ~/.mozilla/firefox/*.default/prefs.js