1Pamexec User Manual(0) Pamexec User Manual(0)
2
3
4
6 pamexec - Execute a shell command on each image in a Netpbm image
7 stream
8
9
11 pamexec
12
13 ["command"]
14
15 [netpbmfile]
16
17 [-check]
18
19 Minimum unique abbreviation of option is acceptable. You may use dou‐
20 ble hyphens instead of single hyphen to denote options. You may use
21 white space in place of the equals sign to separate an option name from
22 its value.
23
24
25
27 This program is part of Netpbm(1).
28
29 pamexec reads a Netpbm image stream as input. For each image, it runs
30 a specified shell command and supplies the image to it as Standard In‐
31 put (with a pipe).
32
33 netpbmfile is the file name of the input file, or - to indicate Stan‐
34 dard Input. The default is Standard Input.
35
36 Many Netpbm programs understand multimage Netpbm streams themselves, so
37 you don't need to use pamexec to run the program on the images in the
38 stream. Ideally, all Netpbm programs would have that capability, but
39 multi-image streams are a relatively recent invention, so older Netpbm
40 programs just process the first image in the stream and then stop.
41 Even recently written Netpbm programs work that way, since the authors
42 aren't aware of the multi-image possibility.
43
44 Another way to process a multi-image stream is to use pamsplit to ex‐
45 plode it into multiple files, one image per file. You can then process
46 those files.
47
48 To run your command on a subset of the images in the stream, use
49 pampick to select the desired images from the input stream and pipe the
50 result to pamexec.
51
52
53
55 In addition to the options common to all programs based on libnetpbm
56 (most notably -quiet, see
57 Common Options ⟨index.html#commonoptions⟩ ), pamexec recognizes the
58 following command line option:
59
60
61
62 -check This causes pamexec to exit without processing any further im‐
63 ages if the command has a nonzero exit status.
64
65
66
67
69 To make an animated GIF movie:
70
71 pamexec pamtogif myvideo.ppm | gifsicle --multifile >myvideo.gif
72
73
74
76 pamexec assumes all commands consume all of Standard Input. If yours
77 doesn't (perhaps it just exits when it's seen enough), you can buffer
78 through a temporary file like this:
79
80 pamexec "cat >/tmp/x; head -3 x" myvideo.ppm
81
82
83
85 pamexec was new in Netpbm 10.56 (September 2011).
86
87 Michael Pot wrote it, borrowing from pamsplit.
88
89
90
92 pamfile(1), pampick(1), pamsplit(1), pnm(1), pam(1), cat man page
93
95 This manual page was generated by the Netpbm tool 'makeman' from HTML
96 source. The master documentation is at
97
98 http://netpbm.sourceforge.net/doc/pamexec.html
99
100netpbm documentation 11 August 2011 Pamexec User Manual(0)