Bug#748562: overkill?
Instead of writing this execpermfix thing in C, I'd do it
as a one-liner in shell.
find FILES-AND-DIRECTORIES \
-type f \
-execdir sh -c 'file --brief "$1" | grep -q executable' -- '{}' \; \
-print0 \
| xargs -0 chmod --verbose +x
Works for me!
(The contortions in the middle are to make sure filenames containing
whitespace, literal single or double quotes, etc, are handled
correctly.)
Cheers,
--Barak.
--
Barak A. Pearlmutter
Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland
http://www.bcl.hamilton.ie/~barak/
Reply to: