Breadcrumbs
Inicio / grep para entornos windows ^^grep para entornos windows ^^
Last Updated on lunes, 14 diciembre 2009 09:13 Written by macuriel lunes, 14 diciembre 2009 09:11
Cual ha sido mi sorpresa hoy, leyendo un artículo sobre implementación de Bacula Client en entornos Windows, encontré el siguiente comando:
findstr
Leyendo más sobre él, puedo concluir que tiene la apariencia de grep, que ni hablo del sed
, pero con menos potencia:
findstr [/b] [/e] [/l] [/r] [/s] [/i] [/x] [/v] [/n] [/m] [/o] [/p] [/offline] [/g:file] [/f:file] [/c:string] [/d:dirlist] [/a:ColorAttribute] [strings] [[Drive:][Path] FileName [...]]
Ey!, que nos deja poner algunas expresiones regulares:
|
. |
Wildcard: any character |
|
* |
Repeat: zero or more occurrences of previous character or class |
|
^ |
Line position: beginning of line |
|
$ |
Line position: end of line |
|
[class] |
Character class: any one character in set |
|
[^class] |
Inverse class: any one character not in set |
|
[x-y] |
Range: any characters within the specified range |
|
\x |
Escape: literal use of metacharacter x |
|
\<xyz |
Word position: beginning of word |
|
xyz\> |
Word position: end of word |
Referencias – http://www.microsoft.com/