Consultor Eletrônico



Kbase P118361: How to pass the output of probkup as input to another program?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to pass the output of probkup as input to another program?

GOAL:

How to output a backup to standard output?

GOAL:

How to create a pipe between probkup and another command?

GOAL:

How to redirect the backup to another program?

GOAL:

How to avoid a temporary file when processing a backup?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
UNIX

FIX:

The probkup command does not provide a feature to output the backup to its standard output. Therefore, it is not possible to use standard UNIX redirections and pipes to redirect the backup to another program.
However, it is possible to pipe the backup to another program by using a so-called "named pipe" (also called FIFO) on the file system. A named pipe is a special file that redirects automatically the data output to it by one program to another program that reads from it. By using a named pipe, no backup data is written to disk before it is further processed.
The standard command on UNIX to create a named pipe is mkfifo(1). Once the named pipe is created, probkup must be set to output the backup to it, and then another command to read from the named pipe. The redirection will be handled automatically by the operating system.