Last active
October 12, 2016 08:06
-
-
Save berdario/da882abe5ba77533edf7f43872b8b80e to your computer and use it in GitHub Desktop.
How to write to a file in bash without reopening the file multiple times
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
exec 3> /tmp/foo | |
echo "1" >&3 | |
echo "2" >&3 | |
exec 3>&- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment