1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pamexec User Manual</TITLE></HEAD>
<BODY>
<H1>pamexec</H1>
Updated: 11 August 2011
<BR>
<A HREF="#index">Table Of Contents</A>
<H2>NAME</H2>
pamexec - Execute a shell command on each image in a Netpbm image stream
<H2 id="synopsis">SYNOPSIS</H2>
<B>pamexec</B>
["<i>command</i>"]
[<I>netpbmfile</I>
[<b>-check</b>]
<p>Minimum unique abbreviation of option is acceptable. You may use double
hyphens instead of single hyphen to denote options. You may use white
space in place of the equals sign to separate an option name from its value.
<H2 id="description">DESCRIPTION</H2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>pamexec</b> reads a Netpbm image stream as input. For each image, it
runs a specified shell command and supplies the image to it as Standard
Input (with a pipe).
<P><I>netpbmfile</I> is the file name of the input file, or
<B>-</B> to indicate Standard Input. The default is Standard Input.
<p>Many Netpbm programs understand multimage Netpbm streams themselves,
so you don't need to use <b>pamexec</b> to run the program on the images
in the stream. Ideally, all Netpbm programs would have that capability,
but multi-image streams are a relatively recent invention, so older Netpbm
programs just process the first image in the stream and then stop. Even
recently written Netpbm programs work that way, since the authors aren't
aware of the multi-image possibility.
<p>Another way to process a multi-image stream is to use <b>pamsplit</b> to
explode it into multiple files, one image per file. You can then process
those files.
<p>To run your command on a subset of the images in the stream, use
<b>pampick</b> to select the desired images from the input stream and pipe
the result to <b>pamexec</b>.
<h2 id="options">OPTIONS</h2>
<dl>
<dt><b>-check</b>
<dd>This causes <b>pamexec</b> to exit without processing any further images
if the command has a nonzero exit status.
</dl>
<h2 id="applications">APPLICATIONS</h2>
To make an animated GIF movie:
<kbd>
<pre>
pamexec pamtogif myvideo.ppm | gifsicle >myvideo.gif
</pre>
</kbd>
<h2 id="limitations">LIMITATIONS</h2>
<p><b>pamexec</b> assumes all commands consume all of Standard Input.
If yours doesn't (perhaps it just exits when it's seen enough),
you can buffer through a temporary file like this:
<kbd>
<pre>
pamexec "cat >/tmp/x; head -3 x" myvideo.ppm
</pre>
</kbd>
<h2 id="history">HISTORY</h2>
<p><b>pamexec</b> was new in Netpbm 10.56 (September 2011).
<p>Michael Pot wrote it, borrowing from <b>pamsplit</b>.
<H2 id="seealso">SEE ALSO</H2>
<B><A HREF="pamfile.html">pamfile</A></B>,
<B><A HREF="pampick.html">pampick</A></B>,
<B><A HREF="pamsplit.html">pampick</A></B>,
<B><A HREF="pnm.html">pnm</A></B>,
<B><A HREF="pam.html">pam</A></B>,
<B>cat</b> man page
<HR>
<H2 id="index">Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#options">OPTIONS</A>
<LI><A HREF="#applications">APPLICATIONS</A>
<LI><A HREF="#limitations">LIMITATIONS</A>
<LI><A HREF="#seealso">SEE ALSO</A>
</UL>
</BODY>
</HTML>
|