![]() |
![]()
| ![]() |
![]()
NAMEfd2 - redirect from/to file descriptor 2 SYNOPSISfd2 [-e] [-f file] [--] command [arg ...] DESCRIPTIONSince the Version 6 (V6) UNIX shell provides no way to redirect the diagnostic output, fd2 makes this possible by executing the specified command with the given arguments and redirecting file descriptor 2 (standard error) to file descriptor 1 (standard output) by default. The options are as follows:
EXIT STATUSIf fd2 detects an error, it prints an appropriate diagnostic and exits with a non-zero status. Otherwise, the exit status is that of the executed command. ENVIRONMENT
EXAMPLESThe examples below which refer to `/tmp/$$' assume that this directory exists and is writable by the user. The following command line: fd2 -e echo progname: Error message
causes all conventional output from echo to be redirected to the standard error as diagnostic output. The following command line: fd2 make foo >/tmp/$$/foo.outerr
causes all conventional and diagnostic output from make to be redirected to the file `/tmp/$$/foo.outerr', which is first created by the shell. In contrast: fd2 -f /tmp/$$/foo.err make foo >/tmp/$$/foo.out
causes all conventional output to be redirected to the file `/tmp/$$/foo.out', which is created by the shell. All diagnostic output is redirected to the file `/tmp/$$/foo.err', which is created by fd2 if it does not already exist. SEE ALSOetsh(1), tsh(1) Etsh home page: https://etsh.nl/ AUTHORJeffrey Allen Neitzel <jan@etsh.nl> wrote this implementation of the fd2 command and maintains it as fd2(1). LICENSESee either the LICENSE file which is distributed with etsh or https://etsh.nl/license/ for full details.
|