#!/bin/sh [ "$1" = "no" ] && shift || args="-A -p 2" cd ~/recoll args="$args -c main" while : ; do [ -d "$1" ] || break args="$args -i $1/xapiandb" shift done recollq $args "$@" 2>/dev/null | perl -ne ' if (/^(ABSTRACT|SNIPPETS)/../^\/(ABSTRACT|SNIPPETS)/) { print "\t$_" unless /^.?(ABSTRACT|SNIPPETS)/; next; }; next unless /^(.*)\t\[file:\/\/(.*)\]\t\[.*\]\t\d+\t.*\t.*$/; print "$2\t$1\n"; ' | spc -e grn,"(^/.*)" | less