Skip to content

Instantly share code, notes, and snippets.

@dlfinis
Created May 7, 2015 23:13
Show Gist options
  • Save dlfinis/ff79ccc7fd8c9d6c7416 to your computer and use it in GitHub Desktop.
Save dlfinis/ff79ccc7fd8c9d6c7416 to your computer and use it in GitHub Desktop.
Reemplazo de Cadenas
### [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