Major nit...

You really shouldn't ever generate a dynamic script from within another and then execute it. Depending on umasks, location, etc, you never know what could be done with the file after your initial creation and before execution occurs.

This is why mktemp exists.

-Brad


On 02/27/2015 07:21 PM, ToddAndMargo wrote:
On 02/27/2015 05:11 PM, John Lauro wrote:
Minor nit... I think your script will have a problem if there is a space in the filename... the find -print0 | while read example should handle spaces...

Not so minor.  I am trying to always remember to surround my stuff in
quotes.  Just like you see me using ${xx} instead of $xx and $()
instead of ``
Revised line:

find -maxdepth 1 -iname \*.pdf -exec echo "\"/opt/pdfstudio9/pdfstudio9\" \"{}\" &" \; >> "${Tmp}"

Reply via email to