Skip to content

Instantly share code, notes, and snippets.

@oviniciusfeitosa
Last active December 11, 2015 18:15
Show Gist options
  • Save oviniciusfeitosa/834b399d82baa4b5ed93 to your computer and use it in GitHub Desktop.
Save oviniciusfeitosa/834b399d82baa4b5ed93 to your computer and use it in GitHub Desktop.
Diferença entre sobrescrever e adicionar conteúdo ao final do arquivo
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