As the title says: "Fish out any URL from the places.sqlite DB with
sqlite3 and awk in MZ browsers."
This is a break-through for me. Before, sqlite DB's had always intimidated
me. This time, I took the bull by the horns.
So here we go:
-- First, the doc: https://sqlite.org/cli.html. It explains how to fish
out info from a sqlite DB at
and9. CSV Export
.15. Using sqlite3 in a shell script
-- Puppy has the sqlite3 utility in /usr/bin.
-- Here is the script:
Code: Select all
#!/bin/sh
# ./sqlite3-places.sh
# (c) musher0, Aug. 7 2017.GPL3
#
# Usage : Drill down with "cd" to the directory where the places.sqlite DB
# is located:
# ~/.mozilla/NameOfYourMZBrowser/RandomDirName.default
# and issue this command:
# sqlite3-places.sh $1 # for a specific search
# or this one
# sqlite3-places.sh # to get a dump of all URLs
####
A="$1"
if [ -z $A ];then # We output the whole URL field
sqlite3 places.sqlite 'select * from moz_places' | awk -F"|" '{ print $2 }' > URLs.output
else # We output only the specified sub-set.
sqlite3 places.sqlite 'select * from moz_places' | awk -F"|" '$2 ~ /'$1'/ { print $2 }' > $1.output # This file is named after your search word.
fi
sqlite3's dot commands in more depth and of getting more familiar
with the places.sqlite DB. Or any other sqlite3 DB.
A example of the text output this script produces is attached.
I used the command
Code: Select all
./sqlite3-places.sh murga
BFN.