Skip to content

my favorite grep to mv pipe

grep –max-count=1 -l -r –include=*.txt –exclude-dir=fragments ‘pattern’ ./*|while read line; do mv “$line” newLocation; done