http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt
mkdir -p ~/bin
curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/0715f4a1d64190011d7813e57a2e8ffe/raw/firefox_export_cookies_txt" > ~/bin/firefox_export_cookies_txt
chmod u+x ~/bin/firefox_export_cookies_txt
# https://kb.mozillazine.org/Profile_folder_-_Firefox#Finding_the_profile_folder
~/bin/firefox_export_cookies_txt /path/to/fxprofile
Note that this script should work even when Firefox is running and has locked the cookies.sqlite
database.
This is made available under the terms of the MIT license. For a copy, see https://opensource.org/licenses/MIT.