#!/bin/sh # parse query book=John chstart=3 chend=3 vstart=16 vend=17 file=$(find oeb/ -name '*'-$book'*') grep '\c '$chstart $file -A500 | grep '\v '$vstart -A500 \ | grep '\c '$(($chend + 1)) -B500 | grep '\v '$vend -B500