Skip to content

Instantly share code, notes, and snippets.

@andboson
Created January 17, 2023 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andboson/aedae8bf6d4ed6a5e5b59c510ba2feea to your computer and use it in GitHub Desktop.
Save andboson/aedae8bf6d4ed6a5e5b59c510ba2feea to your computer and use it in GitHub Desktop.
Search strings in files in dir
#/bin/sh
# read check.txt with strings to find in files in directory 'data'
while read -r line; do
if grep -q -wi "$line" data/* ; then ; else echo "$line - no"; fi;
done <"check.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment