|
|
|
|
|
by txutxu
3716 days ago
|
|
If I could need to combine a find|grep right now (this is, if the directory recursion and filters of grep by itself, weren't enough, which maybe a corner case too...) I could do it like this: while IFS= read -rd '' file; do
echo "do whatever with: $file"
grep whatever -- "$file"
done < <(find ~/whatevers -print0)
It's like natural language if you do it daily.Will handle not only spaces, but also new lines on file names. Have a nice day. |
|