list_files.sh 182 B

123456789101112
  1. search_dir=$1
  2. sentence=$2
  3. for entry in "$search_dir"/*
  4. do
  5. if [ -f $entry ]; then
  6. if grep -q "$sentence" "$entry"; then
  7. echo "$entry"
  8. fi
  9. fi
  10. done