summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-leap-15-6/man1/pamexec.1
blob: 827e09f38137fa11d1baff46052ddc24d552f57a (plain)
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
116
117
118
119
120
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pamexec User Manual" 0 "11 August 2011" "netpbm documentation"
 
.SH NAME

pamexec - Execute a shell command on each image in a Netpbm image stream

.UN synopsis
.SH SYNOPSIS

\fBpamexec\fP

["\fIcommand\fP"]

[\fInetpbmfile\fP]

[\fB-check\fP]
.PP
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.


.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamexec\fP 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).
.PP
\fInetpbmfile\fP is the file name of the input file, or
\fB-\fP to indicate Standard Input.  The default is Standard Input.
.PP
Many Netpbm programs understand multimage Netpbm streams themselves,
so you don't need to use \fBpamexec\fP 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.
.PP
Another way to process a multi-image stream is to use \fBpamsplit\fP to
explode it into multiple files, one image per file.  You can then process
those files.
.PP
To run your command on a subset of the images in the stream, use
\fBpampick\fP to select the desired images from the input stream and pipe
the result to \fBpamexec\fP.


.UN options
.SH OPTIONS


.TP
\fB-check\fP
This causes \fBpamexec\fP to exit without processing any further images
if the command has a nonzero exit status.



.UN applications
.SH APPLICATIONS

To make an animated GIF movie:

.nf
\f(CW
    pamexec pamtogif myvideo.ppm | gifsicle --multifile >myvideo.gif
\fP
.fi

.UN limitations
.SH LIMITATIONS
.PP
\fBpamexec\fP 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:

.nf
\f(CW
    pamexec "cat >/tmp/x; head -3 x" myvideo.ppm  
\fP
.fi

.UN history
.SH HISTORY
.PP
\fBpamexec\fP was new in Netpbm 10.56 (September 2011).
.PP
Michael Pot wrote it, borrowing from \fBpamsplit\fP.


.UN seealso
.SH SEE ALSO
.BR "pamfile" (1)\c
\&,
.BR "pampick" (1)\c
\&,
.BR "pamsplit" (1)\c
\&,
.BR "pnm" (5)\c
\&,
.BR "pam" (5)\c
\&,
\fBcat\fP man page
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pamexec.html
.PP