Created
May 8, 2018 23:47
-
-
Save atomize/612eaea62d1096ef00765e567fee0761 to your computer and use it in GitHub Desktop.
Advance I/O redirection in bash. /dev/null
This file contains hidden or 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
For those unfamiliar with 'advanced' i/o redirection in bash: | |
1) 2>&- ("close output file descriptor 2", which is stderr) has the same result as 2> /dev/null; | |
2) >&2 is a shortcut for 1>&2, which you may recognize as "redirect stdout to stderr". | |
See the Advanced Bash Scripting Guide i/o redirection page for more info. | |
– mikewaters Dec 21 '11 at 19:48 | |
-comment from : https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sometimes 7 year old comments on Stack Overflow are still very useful =)