Re: Viewing multiple .png files simultaneously
- From: philbo30 <masferfc@xxxxxxxxx>
- Date: Wed, 19 Sep 2007 11:18:54 -0700
On Sep 19, 10:19 am, "Chris F.A. Johnson" <cfajohn...@xxxxxxxxx>
wrote:
On 2007-09-19, Josef Moellers wrote:
Chris F.A. Johnson wrote:
On 2007-09-19, philbo30 wrote:
...
ImageMagick is just the tool I was looking for; it works great. The
only additional thing I would like to do is specify the amount of time
that the image displays. As an example, I want it to display for 60
seconds. I didn't see that capability associated with the "display"
application, but then again I didn't look that much either. Ideas?
display ... &
sleep 5
kill "$!"
<pedantic>
make that
display ... &
sleep 60
kill $!
</pedantic>
What if IFS is not the default? E.g.:
$ (> IFS=1234567890
sleep 20 &
sleep 2
kill $!
)
bash: kill: `': not a pid or valid job spec
bash: kill: `': not a pid or valid job spec
bash: kill: `': not a pid or valid job spec
bash: kill: `': not a pid or valid job spec
$
But:
$ (> IFS=1234567890
sleep 20 &
sleep 2
kill $!
)
$
In this case the quotes are needed; in other cases it doesn't hurt
to have them.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
So here's what I have currently using a Linux system() call in a C
app:
system("display array.png &");
system("sleep 5");
system("kill $!");
Clearly there is a problem with my kill syntax since the display never
ends until I manually kill it, at which time I see:
"kill: usage: kill [-s sigspec | -n ...........]"
It seems like I need something like this:
system("kill "$!""); //clearly doesn't work
So, last question, what is the syntax for quotes within quotes? I am
on GNU bash version 2.05a.0(1) i686-pc-linux-gnu [Red Hat 7.3, gcc
2.96]
In advance, thanx for the help. -pb30
.
- Follow-Ups:
- Re: Viewing multiple .png files simultaneously
- From: Chris F.A. Johnson
- Re: Viewing multiple .png files simultaneously
- References:
- Re: Viewing multiple .png files simultaneously
- From: Floyd L. Davidson
- Re: Viewing multiple .png files simultaneously
- From: Roger Leigh
- Re: Viewing multiple .png files simultaneously
- From: philbo30
- Re: Viewing multiple .png files simultaneously
- From: Chris F.A. Johnson
- Re: Viewing multiple .png files simultaneously
- From: Josef Moellers
- Re: Viewing multiple .png files simultaneously
- From: Chris F.A. Johnson
- Re: Viewing multiple .png files simultaneously
- Prev by Date: Re: priority queues (was: Configuration file parser)
- Next by Date: Re: Viewing multiple .png files simultaneously
- Previous by thread: Re: Viewing multiple .png files simultaneously
- Next by thread: Re: Viewing multiple .png files simultaneously
- Index(es):
Relevant Pages
|