About standard output

Don’t I need stdin and stdout? My program has both input and output

In the filter setup, we saw how to configure the RPM Remote Print Manager® ("RPM") filter action for a program that doesn’t need a complex configuration.

In this page, we’ll take a look at a program that uses "standard output". Some programs write their output to the screen or the command window. It’s easy to write a program that works that way in any number of modern programming languages (including C++ and Python as we use here).

The point is not that you should do this but undoubtedly you will run into programs that work this way. Some programs don’t have a parameter for an output file on their command line, and that does not need to be a limitation when you’re using it with RPM.

This is how you do that setup:

Filter setup using stdout

This time we’ve used another program from the "Cygwin" package called "head". Cygwin is a free download with many utilities very similar to what you find on Linux systems. This program takes an optional "number of lines" argument in the form -xx where "xx" is a number. Here, "dash sixty" means to read up to sixty lines and write them on the console, or "standard out".

Note that at the bottom of the dialog, we have a section called "Program Output" which I selected

The template or mask argument includes ".txt". This example will use the job name and add a ".txt" extension to the name. Our output file will be "whatever the job name is" dot TXT.

I ran several hundred files through the filter action and got exactly the expected result.