SCIENTIFIC-LINUX-USERS Archives

February 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
ToddAndMargo <[log in to unmask]>
Reply To:
ToddAndMargo <[log in to unmask]>
Date:
Fri, 27 Feb 2015 17:04:16 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ATOM RSS1 RSS2