1Pamexec User Manual(0)                                  Pamexec User Manual(0)
2
3
4

NAME

6       pamexec  -  Execute  a  shell  command  on each image in a Netpbm image
7       stream
8
9

SYNOPSIS

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

DESCRIPTION

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 many recently written Netpbm programs work that way, since the au‐
42       thors 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

OPTIONS

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

APPLICATIONS

69       To make an animated GIF movie:
70
71           pamexec pamtogif myvideo.ppm | gifsicle --multifile >myvideo.gif
72
73
74

LIMITATIONS

76       pamexec  assumes  all commands consume all of Standard Input.  If yours
77       doesn't (perhaps it just exits when it's seen enough),
78         you can buffer through a temporary file like this, which copies the
79         first 3 lines of every image (the PPM header) to Standard Output:
80
81           pamexec "cat >/tmp/x; head --lines=3 x" myvideo.ppm
82
83
84

HISTORY

86       pamexec was new in Netpbm 10.56 (September 2011).
87
88       Michael Pot wrote it, borrowing from pamsplit.
89
90
91

SEE ALSO

93       pamfile(1), pampick(1), pamsplit(1), pnm(1), pam(1), cat man page
94

DOCUMENT SOURCE

96       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
97       source.  The master documentation is at
98
99              http://netpbm.sourceforge.net/doc/pamexec.html
100
101netpbm documentation           21 December 2021         Pamexec User Manual(0)
Impressum