You can use grep to check if the word is in the file. What I would do is split each paragraph into it's own file, & then find only the files you wish to keep.
This quick script will point out any line that does not start with a letter. Feel free to edit it as need be.
-
#/bin/sh
-
-
file=test.txt
-
-
keep=`cat ${file} | grep -inv "^[a-z]"`
-
for line in ${keep}
-
do
-
echo Line number ${line} can be ignored
-
done
The arguments passed to grep are i for ignore case, n for display number & v for ignore results. Mixed with ^, this line will ignore any line that begins with a character (ignoring case) of a through z. It then passes the line number of any output that doesn't meet that requirement.
You should then be able to cat the file, search for the line numbers not in that line set, output the contents to individual files passed through grep of the keyword, & you have files of each paragraphs with your chosen key word.