Debian Codegraph @

upstream/debian-unstable/man1/pamexec.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pamexec User Manual" 1 "21 December 2021" "netpbm documentation"
7
8 .SH NAME
9 pamexec - Execute a shell command on each image in a Netpbm image stream
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 \fBpamexec\fP
15
16 ["\fIcommand\fP"]
17
18 [\fInetpbmfile\fP]
19
20 [\fB-check\fP]
21 .PP
22 Minimum unique abbreviation of option is acceptable. You may use double
23 hyphens instead of single hyphen to denote options. You may use white
24 space in place of the equals sign to separate an option name from its value.
25
26
27 .UN description
28 .SH DESCRIPTION
29 .PP
30 This program is part of
31 .BR "Netpbm" (1)\c
32 \&.
33 .PP
34 \fBpamexec\fP reads a Netpbm image stream as input. For each image, it
35 runs a specified shell command and supplies the image to it as Standard
36 Input (with a pipe).
37 .PP
38 \fInetpbmfile\fP is the file name of the input file, or
39 \fB-\fP to indicate Standard Input. The default is Standard Input.
40 .PP
41 Many Netpbm programs understand multimage Netpbm streams themselves, so you
42 don't need to use \fBpamexec\fP to run the program on the images in the
43 stream. Ideally, all Netpbm programs would have that capability, but
44 multi-image streams are a relatively recent invention, so older Netpbm
45 programs just process the first image in the stream and then stop. Even many
46 recently written Netpbm programs work that way, since the authors aren't aware
47 of the multi-image possibility.
48 .PP
49 Another way to process a multi-image stream is to use \fBpamsplit\fP to
50 explode it into multiple files, one image per file. You can then process
51 those files.
52 .PP
53 To run your command on a subset of the images in the stream, use
54 \fBpampick\fP to select the desired images from the input stream and pipe
55 the result to \fBpamexec\fP.
56
57
58 .UN options
59 .SH OPTIONS
60 .PP
61 In addition to the options common to all programs based on libnetpbm
62 (most notably \fB-quiet\fP, see
63 .UR index.html#commonoptions
64 Common Options
65 .UE
66 \&), \fBpamexec\fP recognizes the following
67 command line option:
68
69
70 .TP
71 \fB-check\fP
72 This causes \fBpamexec\fP to exit without processing any further images
73 if the command has a nonzero exit status.
74
75
76
77 .UN applications
78 .SH APPLICATIONS
79
80 To make an animated GIF movie:
81
82 .nf
83 \f(CW
84 pamexec pamtogif myvideo.ppm | gifsicle --multifile >myvideo.gif
85 \fP
86
87 .fi
88
89 .UN limitations
90 .SH LIMITATIONS
91 .PP
92 \fBpamexec\fP assumes all commands consume all of Standard Input.
93 If yours doesn't (perhaps it just exits when it's seen enough),
94 you can buffer through a temporary file like this, which copies the
95 first 3 lines of every image (the PPM header) to Standard Output:
96
97 .nf
98 \f(CW
99 pamexec "cat >/tmp/x; head --lines=3 x" myvideo.ppm
100 \fP
101
102 .fi
103
104 .UN history
105 .SH HISTORY
106 .PP
107 \fBpamexec\fP was new in Netpbm 10.56 (September 2011).
108 .PP
109 Michael Pot wrote it, borrowing from \fBpamsplit\fP.
110
111
112 .UN seealso
113 .SH SEE ALSO
114 .BR "pamfile" (1)\c
115 \&,
116 .BR "pampick" (1)\c
117 \&,
118 .BR "pamsplit" (1)\c
119 \&,
120 .BR "pnm" (1)\c
121 \&,
122 .BR "pam" (1)\c
123 \&,
124 \fBcat\fP man page
125 .SH DOCUMENT SOURCE
126 This manual page was generated by the Netpbm tool 'makeman' from HTML
127 source. The master documentation is at
128 .IP
129 .B http://netpbm.sourceforge.net/doc/pamexec.html
130 .PP