# /usr/bin/env bash

# use: bash grepping-unix-time-sharing.sh searchterm searchterm searchterm etc

curl https://archive.org/stream/bstj57-6-1899/bstj57-6-1899_djvu.txt | \
sed '/<pre>/,/<\/pre>/p' | \
textutil -stdin -format html -convert txt -stdout > /tmp/bstj57-6-1899_djvu.txt
grepunix () {
  str="${1}"
grep -o "${str}[^\.]*." /tmp/bstj57-6-1899_djvu.txt
}
for zoekterm in "${@}"
do
echo -e "\n${zoekterm}"
  grepunix "${zoekterm}"
done