Last active
December 11, 2015 18:15
-
-
Save oviniciusfeitosa/834b399d82baa4b5ed93 to your computer and use it in GitHub Desktop.
Diferença entre sobrescrever e adicionar conteúdo ao final do arquivo
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
A little understanding of how *nix pipes work would help. | |
In short the '>>' pipe operator will append lines to the end of the specified file, where-as the single greater than '>' will empty and overwrite the file. | |
echo "text" > 'Users/Name/Desktop/TheAccount.txt' | |
FONTE: http://stackoverflow.com/questions/4676459/write-to-file-but-overwrite-it-if-it-exists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment