entry: silencing stdout

This commit is contained in:
Thomas Bishop 2025-12-06 17:34:49 +00:00
parent d91e1652ba
commit 0e8e1c59bf
2 changed files with 20 additions and 4 deletions

View file

@ -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
```

View 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`.