Cara..
Tenta trocar \n por \x0a ... aqui com \n nao funcionou e com \x0a funcionou...
$ cat arq.txt | tr -s '\n' ' ' | sed -e 's/filter/\x0afilter/g'
Flavio do Carmo Junior aka blk1d
On 8/1/06, Natanael Martins Neves <address@hidden> wrote:
> Reinaldo,
> Tente
>
>
> sed 's` m`m`g' arq.txt|tr '\n' ' '|sed 's`\(:[0-9]\{4\}\) `\1\n`g;s`\(at
> [0-9]\{2\}\) f`\1\nf`g'
>
> -----
> Natan
>
>
>
>
> 2006/8/1, Reinaldo Carvalho <address@hidden>:
> >
> > Saudações,
> >
> > infelizmente o comando abaixo não funcionou em versão antigas do
> > sed... será que alguém pode fazer com awk?
> >
> > $ cat arq.txt
> > filter parent 1: protocol ip pref 2 u32 fh 801::817 flowid 1:1060
> > match 00000000/00000000 at 12
> > match 0a0b0100/ffffff00 at 16
> > match 00500000/ffff0000 at 20
> > filter parent 1: protocol ip pref 2 u32 fh 801::817 flowid 1:1060
> > match 00000000/00000000 at 12
> > match 0a0b0100/ffffff00 at 16
> > match 00500000/ffff0000 at 20
> >
> > $ cat arq.txt | tr -s '\n' ' ' | sed -e 's/filter/\nfilter/g'
> > filter parent 1: protocol ip pref 2 u32 fh 801::817 flowid 1:1060
> > match 00000000/00000000 at 12 match 0a0b0100/ffffff00 at 16 match
> > 00500000/ffff0000 at 20
> > filter parent 1: protocol ip pref 2 u32 fh 801::817 flowid 1:1060
> > match 00000000/00000000 at 12 match 0a0b0100/ffffff00 at 16 match
> > 00500000/ffff0000 at 20
> >
> >
> > --
> > Reinaldo Carvalho
> > Debian Sarge 3.1 - Linux User: #238310
> > Prodepa - address@hidden
> >
> >
> > ---------------------------------------------------------------------
> > Esta lista não admite a abordagem de outras liguagens de programação, como
> > perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio
> > aviso.
> > ---------------------------------------------------------------------
> > Sair da lista: address@hidden
> > ---------------------------------------------------------------------
> > Esta lista é moderada de acordo com o previsto em
> > http://www.listas-discussao.cjb.net
> > ---------------------------------------------------------------------
> > Servidor Newsgroup da lista: news.gmane.org
> > Grupo: gmane.org.user-groups.programming.shell.brazil
> >
> >
> > Links do Yahoo! Grupos
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>
>
> ---------------------------------------------------------------------
> Esta lista não admite a abordagem de outras liguagens de programação, como
perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio aviso.
> ---------------------------------------------------------------------
> Sair da lista: address@hidden
> ---------------------------------------------------------------------
> Esta lista é moderada de acordo com o previsto em
http://www.listas-discussao.cjb.net
> ---------------------------------------------------------------------
> Servidor Newsgroup da lista: news.gmane.org
> Grupo: gmane.org.user-groups.programming.shell.brazil
>
>
> Links do Yahoo! Grupos
>
>
>
>
>
>
>
>