This question already has an answer here:
- What does 2>/dev/null mean? 4 answers
Oftentimes I run into small bash scripts that use this sort of syntax in if statements:
some command > /dev/null 2>&1
What is the purpose of outputting to
/dev/null like that, and what does the
It always seems to work but I'd like to know what it's doing.