arghh

[EMAIL PROTECTED]:~$ grep --help | grep \\-o
  -b, --byte-offset         print the byte offset with output lines
  -o, --only-matching       show only the part of a line matching PATTERN
  -u, --unix-byte-offsets   report offsets as if CRs were not there (MSDOS)
[EMAIL PROTECTED]:~$

Agora é por sua conta.


Flavio do Carmo Junior


On 11/27/06, Rodrigo Monteiro <[EMAIL PROTECTED]> wrote:
>
>   Bom dia!
>
> Gostaria de saber se existe algum comando que faça o seguinte:
>
> # echo "isso aqui eh um teste. teste1={MMM} teste2={KKK}" | comando "MMM"
> teste1={MMM}
> # echo "isso aqui eh um teste. teste1={MMM} teste2={KKK}" | comando "KK"
> teste2={KKK}
>
> Ou seja, um grep que não me retorne a linha toda, mas sim somente a
> string que se encaixe no padrão procurado.
> Ajudas?
>
> []s
>
> --
> Rodrigo Monteiro
> "Free as in Freedom, not free as in free beer"
> Linux User # 403730
> JID: [EMAIL PROTECTED] <mrodrigom%40jabber.org>
> [EMAIL PROTECTED] <mrodrigox%40gmail.com>
>  
>


[As partes desta mensagem que não continham texto foram removidas]

Responder a