grep

grep

Simple file copy script using for

for file in $(grep -l "search_string" /files/to/sea.rch); do
  cp "$file" /path/to/destination/
done

Metadata

Sources

grep - Wikipedia