From aebebe8e665aea4d1c4f9a9ad870e833537a6ffb Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 12 Aug 2011 02:54:34 +0000 Subject: miscellaneous update git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@1535 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pamexec.html | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 pamexec.html (limited to 'pamexec.html') diff --git a/pamexec.html b/pamexec.html new file mode 100644 index 00000000..76acb7ed --- /dev/null +++ b/pamexec.html @@ -0,0 +1,115 @@ + +Pamexec User Manual + +

pamexec

+Updated: 11 August 2011 +
+Table Of Contents + +

NAME

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

SYNOPSIS

+ +pamexec + +["command"] + +[netpbmfile + +[-check] + +

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. + + +

DESCRIPTION

+ +

This program is part of Netpbm. + +

pamexec 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). + +

netpbmfile is the file name of the input file, or +- to indicate Standard Input. The default is Standard Input. + +

Many Netpbm programs understand multimage Netpbm streams themselves, +so you don't need to use pamexec 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. + +

Another way to process a multi-image stream is to use pamsplit to +explode it into multiple files, one image per file. You can then process +those files. + +

To run your command on a subset of the images in the stream, use +pampick to select the desired images from the input stream and pipe +the result to pamexec. + + +

OPTIONS

+ +
+
-check + +
This causes pamexec to exit without processing any further images +if the command has a nonzero exit status. + +
+ +

APPLICATIONS

+ +To make an animated GIF movie: + + +
+    pamexec pamtogif myvideo.ppm | gifsicle >myvideo.gif
+
+
+ +

LIMITATIONS

+ +

pamexec 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: + + +

+    pamexec "cat >/tmp/x; head -3 x" myvideo.ppm  
+
+ + +

HISTORY

+ +

pamexec was new in Netpbm 10.56 (September 2011). + +

Michael Pot wrote it, borrowing from pamsplit. + + +

SEE ALSO

+ +pamfile, +pampick, +pampick, +pnm, +pam, +cat man page + +
+

Table Of Contents

+ + + -- cgit 1.4.1