Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to convert all powerpoint type files to pdf using the find -exec and unoconv command.

find . -name '*.@(ppt|PPT|pptx|PPTX|pps|PPS|ppsm|PPSM|ppsx|PPSX|pptm|PPTM)' -exec unoconv -v -f pdf '{}' \;

I have done this before, but since I included the extended pattern matching it does not work. I have tried various options but nothing works. I would appreciate if someone can tell me what I am doing wrong. It just doesn't run.

share|improve this question
add comment

1 Answer

find doesn't support extended pattern matching. Assuming you have a find with -iname support (like GNU find), I'd use something like:

find . \( -iname '*.ppt*' -o -iname '*.pps*' \) -exec unoconv -v -f pdf '{}' \;

If you're really worried about that matching files incorrectly, you can use more -o clauses with more restrictive patterns.

share|improve this answer
    
… or even -iname '*.pp[st]*'. –  Scott May 2 '13 at 23:25
    
thanks, that worked for me. –  Jacques MALAPRADE May 2 '13 at 23:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.