#!/usr/bin/env sh
DB_PATH="$1"
shift
get_title() {
FILE="$1"
PATTERN="
.*\(Autoconf\).*"
#Find pattern in file
grep -Eo "$PATTERN" "$FILE" |
#Remove tag
sed 's/<[^>]*>//g' | \
#Remove '(automake)'
sed 's/(Autoconf)//g' | \
#Remove trailing space
sed 's/[ ]*$//g' | \
#Replace '&' with '&'
sed 's/&/&/g' | \
#Replace '<' with '<'
sed 's/</