Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash dev/null

Anything sent to /dev/null will be automatically discarded. 
This is useful if we dont care about the output of a command (just that it ran).

$  grep -r hello /sys/ > /dev/null 2>&1

- discarding stdout with first >
- discarding stderr with second 2>
 
PREVIOUS NEXT
Tagged: #bash
ADD COMMENT
Topic
Name
3+1 =