🌱 GREP all files of type
Grep all txt files for term
#!/bin/bash
find . -name "*.txt" -print0 | xargs -0 grep "term"
Create a shell script to delete all found files
#!/bin/bash
find . | xargs grep -l "DSP Nominee" | awk '{print "rm "$1}' > doit.sh
Run script by:
. doit.sh