How to 'echo "" > x' on multiple files
Solution 1:
You don't need the echo. Just
>filename
will empty the file. To edit rassie...
for FILE in *.log
do
>"${FILE}"
done
The quotes and brackets are preferred, as they will correctly handle files with spaces or special characters in them.
Solution 2:
Just for fun, another variation combining Eric Dennis' find
with everybody else's redirection:
find . -name "*.log" -exec sh -c ">{}" \;