diff --git a/zk/Redirect_to_dev_null.md b/zk/Redirect_to_dev_null.md index 535cbf6..5f151d2 100644 --- a/zk/Redirect_to_dev_null.md +++ b/zk/Redirect_to_dev_null.md @@ -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 +``` diff --git a/zk/Silence_output_in_Curl.md b/zk/Silence_output_in_Curl.md new file mode 100644 index 0000000..3135473 --- /dev/null +++ b/zk/Silence_output_in_Curl.md @@ -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`.