🌱 GREP all files of type

Source

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
Made by Brandon . If you find this project useful you can donate.