On 02/27/2015 04:38 PM, ToddAndMargo wrote:
Hi All,
I am trying to get PDF Studio to open multiple pdf's
from a script. But PDF Studio will only accept one file
name on its command line. But you can have multiple
PDF Studios open, so I tried
find -maxdepth 1 -iname \*.pdf -exec /opt/pdfstudio9/pdfstudio9 {} \;
But you have to close the first instance to get the second
to open, etc..
I have tried adding "&" to the end, but no syntax joy.
How to I get "-exec" to run and release, so "find" can go
on to the next instance?
Many thanks,
-T
This works, but Gee Wiz!
#!/bin/bash
# Open all (lower case) pdf documents in this directory
# /usr/bin/acroread *.pdf
#/opt/pdfstudio9/pdfstudio9 *.pdf
Tmp="Open.All.PDFs.tmp.sh"
if [ -f "${Tmp}" ]; then rm "${Tmp}"; fi
echo "#!/bin/bash" > "${Tmp}"
echo "" >> "${Tmp}"
find -maxdepth 1 -iname \*.pdf -exec echo "/opt/pdfstudio9/pdfstudio9 {}
&" \; >> "${Tmp}"
chmod 755 "${Tmp}"
eval "${Tmp}"
rm "${Tmp}"
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~