'Is there any way to log the active URL (in firefox) to disk in a readable manner?

I'm looking to output (or otherwise read) the current active URL (window.location.href) from firefox (dev edition in case it matters), to read from a bash script. So far I've considered using recovery.jsonlz4 and places.sqlite but neither gives me specifically the current URL, and I've also thought about using cookies or local storage, however neither is readable by the script (as I can't easily find it within the binary cache). What would the best way to do this be?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source