[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Pega uma linha e a próxima
From: |
Flavio Torres |
Subject: |
Re: [shell-script] Pega uma linha e a próxima |
Date: |
Mon, 28 Sep 2009 17:39:47 -0300 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Denis S. Costa wrote:
> Boa noite a tod@s
>
> Tenho um arquivo mais ou menos assim
>
> <title>Today is the day</title> <description>Today is a good day to
> scripting</description> <data>sun,25/12/2009</data>
>
> <title>hoje é um gramde dia</title>
>
> <description>Grande é com "N", e não com "M"</description>
>
> <data>sun,25/12/2009</data>
>
> tô editando em sed, e não consigo pegar a linha do title e a da
> data, que são as duas únicas linhas que me interesam. Ficaria assim
> então:
>
> <title>Today is the day</title>
>
>
> <data>sun,25/12/2009</data>
>
>
> <title>hoje é um gramde dia</title>
>
>
>
>
> <data>sun,25/12/2009</data>
>
>
Olá,
Tente asssim>
sed -n '/<title>/p;/<data>/p'
[]'s
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrBHxMACgkQNRQApncg296k4wCePaUTVvGV0cwKgojqpC4epVTh
sYEAmwf8xxFEgFQNKQha9oaae4hX9XBT
=fa4X
-----END PGP SIGNATURE-----
- Pega uma linha e a próxima, Denis S. Costa, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Breno Moiana, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima,
Flavio Torres <=
- Re: [shell-script] Pega uma linha e a próxima, Moacir Souza, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Denis S. Costa, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Flavio Torres, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Denis S. Costa, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Flavio Torres, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Denis S. Costa, 2009/09/28
- Re: [shell-script] Pega uma linha e a próxima, Denis S. Costa, 2009/09/28
Re: [shell-script] Pega uma linha e a próxima, Julio C. Neves, 2009/09/28
Re: [shell-script] Pega uma linha e a próxima, Jose Edson Moreno Jr, 2009/09/28