Created
March 14, 2015 05:30
-
-
Save mondwan/adf3d22d47b13bd9bc61 to your computer and use it in GitHub Desktop.
Types of io redirection in Linux
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
# redirect stdout | |
echo "hello" > a.out | |
# redirect stderr | |
echo "hello" 2> a.out | |
# redirect both of them | |
echo "hello" > a.out 2>&1 | |
# shortcut | |
echo "hello" >& a.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment