#! /bin/bash
#
# You MUST be able to run this script file as:
#    bash findtest
# Do NOT make any changes that makes it fail to execute.
# Change only PUTYOURFINDEXPRESSIONHERE at end of the three find commands
# Print *only* the name of matching files
# For full credit, use only find -- Avoid pipes

MATCHDIR=/home/brock/MPLABXProjects
if [ "$#" -ne 0 ]; then
    MATCHDIR="$1"
fi
echo "Find tests for the directory $MATCHDIR"
echo
echo
# 
echo "FIND1:"
echo "  file name ends in .hex"
find "$MATCHDIR" PUTYOURFINDEXPRESSIONHERE
echo
echo "FIND2:"
echo "  file contains the word RED and the word YELLOW"
echo "  (possibly on different lines)"
find "$MATCHDIR" PUTYOURFINDEXPRESSIONHERE
echo
echo "FIND2:"
echo "  file modified over a year ago *or* is over 1 Mbyte in size"
find "$MATCHDIR" PUTYOURFINDEXPRESSIONHERE
echo
