execline
Software
skarnet.org

The redirfd program

redirfd redirects a given file descriptor to a file, then executes a program.

Interface

     redirfd [ -r | -w | -u | -a | -x ] [ -n ] [ -b ] fd file prog...
redirfd [ -r | -w | -u | -a | -x ] [ -n ] [ -b ] [ -f ] [ -e | -E ] var file prog...

redirfd redirects the file descriptor number fd to file, then execs into prog....

When run with the -v option, the first argument is instead interpreted as an environment variable. redirfd opens file, stores the obtained file descriptor into environment variable var, then execs into prog....

Options

One and only one of the -r, -w, -u, -a, or -x options must be given; the -n and -b options may be added in any case.

Notes

Special fifo handling

The -n and -b options are especially useful with named pipes.