Empecé a usarlo ack
hace un tiempo y es sorprendente, pero aún surge la pregunta:
¿Hay algo grep
todavía?lo hace mejorque ack
?
¿O tal vez hay algo que grep
hace eso?ack
no puedo hacer?
Respuesta1
Deberías echar un vistazo a la página de manual y te dirá:
WHEN TO USE GREP
ack-grep trumps grep as an everyday tool 99% of the time, but don't
throw grep away, because there are times you'll still need it.
E.g., searching through huge files looking for regexes that can be
expressed with grep syntax should be quicker with grep.
If your script or parent program uses grep "--quiet" or "--silent" or
needs exit 2 on IO error, use grep.
Respuesta2
ack
No forma parte de la instalación predeterminada en todos los servidores Linux/Unix, pero sí grep
lo es. ¿Has probado the_silver_searcher o the_platinum_searcher? Ambos corren más rápido queack
Respuesta3
Si está buscando archivos binarios, debe usar grep porque ack los ignorará siempre.
Al buscar algunos archivos grandes, grep será más rápido que ack.
Parece que estás tratando de decidir si debes abandonar grep y usar ack todo el tiempo, y te sugiero que no lo hagas. Debes usar tanto grep como ack cuando sea apropiado. Básicamente, ack es para buscar código fuente y grep es para búsquedas de propósito general.