-
-
Save sangar82/0edf00f51e683a47195569404aca5173 to your computer and use it in GitHub Desktop.
This file contains 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
Buscar todas las lineas que contengan 'campaigns/' y 'info' | |
````bash | |
grep -e "campaigns/" *.log | grep -e "info" | |
```` | |
Contar todas las líneas que contengan 'campaigns/' y 'info' | |
````bash | |
grep -e "campaigns/" *.log | grep -e "info" | wc -l | |
```` | |
Buscar todas las lineas que contengan 'campaigns/' y que diga el número de fila | |
````bash | |
grep -e "campaigns/" *.log -n | |
```` | |
Buscar todas las lineas que contengan 'campaigns/' y devuelve tres lineas antes (B = before) y tres lineas despues (A = after) | |
````bash | |
grep -e "campaigns/" *.log -B 3 -A 3 | |
```` | |
Buscar todas las lineas que contengan 'campaigns/' y devuelve lineas coloreadas con los resultados | |
````bash | |
grep -e "campaigns/" *.log --color=auto | |
```` | |
Buscar todas las lineas que contengan 'campaigns/' y devuelve solo la ultima fila | |
````bash | |
grep -ve "campaigns/" *.log |tail -n 1 | |
```` | |
Buscar todas las lineas que contengan 'campaigns/' y devuelve el resultado en una screen que permite búsquedas y paginado | |
````bash | |
grep -e "campaigns/" *.log -n| less | |
```` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment