#!/bin/sh # Grep through the patchlist directory to find occurrences of a phrase, ala # bb-findpatch -r "walrus blubber" REVERSE="" if [ "$1" == "-r" ] then REVERSE="r" shift fi cd patchlist ls | sort -t- -k2,2n"$REVERSE" | xargs grep -l "$1" | xargs cat