This commit is contained in:
Mitchell Perilstein 2019-09-21 11:58:56 -04:00
parent 22d69241d1
commit 764ebd09ab
2 changed files with 4 additions and 4 deletions

View File

@ -1031,9 +1031,9 @@ echo -n >file
printf '' >file
```
## Use `exec` to change the shell's file descriptors.
## Use `exec` to change the shell's file descriptors
Calling `exec` with redirection to a file can be used for logging all output.
Use `exec` to redirection any output to the given file descriptors. In the example, stdout and stderr are both being redirected such that output of any commands afterwards will go to that file.
**Example Function:**

View File

@ -164,9 +164,9 @@ echo -n >file
printf '' >file
```
## Use `exec` to change the shell's file descriptors.
## Use `exec` to change the shell's file descriptors
Calling `exec` with redirection to a file can be used for logging all output.
Use `exec` to redirection any output to the given file descriptors. In the example, stdout and stderr are both being redirected such that output of any commands afterwards will go to that file.
**Example Function:**