#!/bin/bash if [ a = a$2 ]; then echo Usage: $0 pattern dir-to-search exit 1 fi echo echo echo "*** Searching $2 and below for files named *$1" echo echo # # The "2> /dev/null" is to keep errors from appearing find $2 -iname "*$1*" 2> /dev/null # # The quotes are needed to keep the shell from expanding the * echo echo "** Finished **"