Tuesday, March 15, 2016

How can I process the results of find in a bash script?

How can I process the results of find in a bash script?

find . -name '*.txt' | while read line; do
    echo "Processing file '$line'"
done

Reference:

http://stackoverflow.com/questions/2087001/how-can-i-process-the-results-of-find-in-a-bash-script

No comments: