I sometimes have quite a big range of tabs open in Firefox and I prefer it to save them to a file, rather then using the build-in bookmarks.
Therefore I (manually) copy the urls from the about:preferences page, save them to a file and process the file with: tr '|' '\n' in a little bash script.
Later when I want to reopen the tabs from the textfile I run this little loop:
#!/bin/bash
# usage: $bash Open-tabs.sh file-with-bookmarks.txt
while read -r line; do
firefox -new-tab "$line" 2>/dev/null &
sleep 2
done < "$1"
and it opens all tabs with a delay of 2 seconds.
I would like to know if there is a way, I can read-out the urls of the opened tabs from the command line, so I could include it to my script?