3
DBFILE=~/.config/darktable/library.db
4
QUERY="select A.id,B.folder,A.filename from images as A join film_rolls as B on A.film_id = B.id"
5
sqlite3 $DBFILE "$QUERY"| while read result
7
ID=$(echo $result | cut -f1 -d"|")
8
FD=$(echo $result | cut -f2 -d"|")
9
FL=$(echo $result | cut -f3 -d"|")
12
echo "removing non existent file $FD/$FL"
13
# uncomment this dangerous line to actually do it:
14
# sqlite3 $DBFILE "delete from images where id=$ID"