Created
May 7, 2015 23:13
-
-
Save dlfinis/ff79ccc7fd8c9d6c7416 to your computer and use it in GitHub Desktop.
Reemplazo de Cadenas
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
### [Utilizacion en entornos/herramientas que utilizen comandos de GNU/Linux] | |
### Ubicarse en el directorio que se reemplazaran las cadenas | |
##Recursivo | |
grep -rl 'windows' ./ | xargs sed -i 's/windows/linux/g' | |
##Incluido elementos ocultos | |
find . -type f -exec sed -i 's/foo/bar/g' {} + | |
##No recursivo , archivos y directorios actuales: | |
sed -i -- 's/foo/bar/g' * | |
perl -Ti -pe 's/foo/bar/g' ./* | |
##Archivos/Files | |
#http://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files | |
#http://vasir.net/blog/ubuntu/replace_string_in_multiple_files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment