entry: silencing stdout
This commit is contained in:
parent
d91e1652ba
commit
0e8e1c59bf
2 changed files with 20 additions and 4 deletions
|
|
@ -17,11 +17,10 @@ because you don't want it to be output to `stdout`.
|
|||
|
||||
The `2>&1` argument is the content: any errors that the program may generate and
|
||||
try to show in stout. Notice we are using the
|
||||
[file descriptors](File_descriptors_and_redirection.md)
|
||||
`1` and `2`.
|
||||
[file descriptors](File_descriptors_and_redirection.md) `1` and `2`.
|
||||
|
||||
If you just want the errors regardless of whether they appear in `stdout` you
|
||||
do:
|
||||
If you just want to rid the errors regardless of whether they appear in `stdout`
|
||||
you do:
|
||||
|
||||
```bash
|
||||
[some_command] > /dev/null 2>
|
||||
|
|
@ -37,3 +36,11 @@ mongodb-compass > /dev/null 2>&1
|
|||
|
||||
Here, I just want the MongoDB Compass application to start, I don't care if it
|
||||
wants to output complaints to the stout.
|
||||
|
||||
## Redirect `stdout` to null
|
||||
|
||||
No need to use a [file descriptor](./File_descriptors.md):
|
||||
|
||||
```sh
|
||||
command > /dev/null
|
||||
```
|
||||
|
|
|
|||
9
zk/Silence_output_in_Curl.md
Normal file
9
zk/Silence_output_in_Curl.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
- procedural
|
||||
- curl
|
||||
- Linux
|
||||
---
|
||||
|
||||
Use `-S` to hide the percentage calculation in `stdout`. You can also use `-s`
|
||||
but this will also remove `stderr`.
|
||||
Loading…
Add table
Reference in a new issue