Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: SuperDraco en 19 Marzo 2011, 10:42 am



Título: [ BATCH] F.A.R.T. (Find And Replace Text) El nombre lo dice todo, es muy bueno!
Publicado por: SuperDraco en 19 Marzo 2011, 10:42 am
Hola, me he encontrado una utilidad muy buena en el foro de AutoIt, y quiero compartirla...

Personalmente como soy usuario de Windows 7, no tengo el EDLIN.exe, y estoy muy cansado de lo complicado que se me hace usar el SED.exe, en cambio, FART deslumbra por su sencillez de uso, Aunque eso no significa que no pueda hacer tares dificiles!

Un ejemplo fácil es:

Código:
FART.exe -q lista.txt \" --remove

Con ese comando elimina todas las comillas dentro del archivo lista.txt

Código:
FART.exe -q lista.txt hola adios

Con ese comando busca TODAS las palabras "hola" y las sustituye por "adios"




Código:
Usage: FART [options] [--] <wildcard>[,...] [find_string] [replace_string]

Options:
 -h --help          Show this help message (ignores other options)
 -q --quiet         Suppress output to stdio / stderr
 -V --verbose       Show more information
 -r --recursive     Process sub-folders recursively
 -c --count         Only show filenames, match counts and totals
 -i --ignore-case   Case insensitive text comparison
 -v --invert        Print lines NOT containing the find string
 -n --line-number   Print line number before each line (1-based)
 -w --word          Match whole word (uses C syntax, like grep)
 -f --filename      Find (and replace) filename instead of contents
 -B --binary        Also search (and replace) in binary files (CAUTION)
 -C --c-style       Allow C-style extended characters (\xFF\0\t\n\r\\ etc.)
    --cvs           Skip cvs dirs; execute "cvs edit" before changing files
 -a --adapt         Adapt the case of replace_string to found string
 -b --backup        Make a backup of each changed file
 -p --preview       Do not change the files but print the changes


Se puede descargar desde aquí:
http://sourceforge.net/projects/fart-it/files/fart-it/1.99b/fart199b_win32.zip/download


Título: Re: [ BATCH] F.A.R.T. (Find And Replace Text) El nombre lo dice todo, es muy bue
Publicado por: TheInfinityJoker en 19 Marzo 2011, 12:06 pm
Buen post ;)
Si tengo alguna duda te la pregunto va??
 :laught:
Saludos