Last active
January 7, 2023 22:08
-
-
Save vielhuber/702e897d5fa6c6b0afca32eb042e3bdd to your computer and use it in GitHub Desktop.
linux / windows output suppress redirect to nirvana / stdout / stderr run in background 2>&1 #linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# linux (no output) | |
bash script.sh > /dev/null 2>&1 | |
# linux (no output & run in background) | |
bash script.sh > /dev/null 2>&1 & | |
# windows (no output) | |
echo foo 2> nul | |
# windows (run in background) | |
start /b bash script.sh | |
# unix & windows (no output) | |
echo foo >nul 2>&1 | |
# unix (no output) | |
echo foo 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment