Bugou
[kanazuchi@localhost ~]$ cat file_test.txtname nickname
lastnamename|nickname|lastname[kanazuchi@localhost ~]$ sed -e 's/ /;/g' -i.bak
file_test.txt [kanazuchi@localhost ~]$ cat
file_test.txtname;nickname;lastnamename|nickname|lastname[kanazuchi@localhost
~]$ sed -e 's/|/;/g' -i.bak file_test.txt [kanazuchi@localhost ~]$ cat
file_test.txtname;nickname;lastnamename;nickname;lastname[kanazuchi@localhost
~]$
> From: [email protected]
> To: [email protected]
> Date: Tue, 25 Nov 2014 22:23:15 +0300
> Subject: Re: [FUG-BR] OT: script
>
> Tenta usar o -i
> [kanazuchi@localhost ~]$ cat file_test.txtname nickname
> lastnamename|nickname|lastname[kanazuchi@localhost ~]$ sed -e 's/ /;/g'
> -i.bak file_test.txt [kanazuchi@localhost ~]$ cat
> file_test.txtname;nickname;lastnamename|nickname|lastname[kanazuchi@localhost
> ~]$ sed -e 's/|/;/g' -i.bak file_test.txt [kanazuchi@localhost ~]$ cat
> file_test.txtname;nickname;lastnamename;nickname;lastname[kanazuchi@localhost
> ~]$
> > Date: Tue, 25 Nov 2014 17:06:04 -0200
> > From: [email protected]
> > To: [email protected]
> > Subject: Re: [FUG-BR] OT: script
> >
> >
> > On 25-11-2014 17:00, Pedro Silva wrote:
> > > Desculpem o OT, mas é um coisa simples que não estou conseguindo resolver:
> > > estou tentando inserir, via "sed", delimitadores em um arquivo texto (link
> > > abaixo), mas não estou conseguindo.
> > >
> > > tentativas:
> > >
> > > sed 's/ /;/g' fx.txt
> > > sed 's/\t/;/g' fx.txt
> > > sed 's/\x0/;/g' fx.txt
> > >
> > > Nenhum desses comando consegue inserir o ";" entre as colunas; como
> > > descubro os caracteres entre as colunas?
> > >
> > > http://campuscolinas.org/ff.txt.gz
> > >
> > > Quem puder dar uma olhada, agradeço.
> > >
> > Opa Pedro...
> > Tente assim.
> > cat ff.txt | awk '{print $1";"$2";"$3";"$4}'
> >
> > --
> > Tiago Drumond
> > Analista de Suporte
> > [email protected]
> > 31 3516 0800
> >
> > -------------------------
> > Histórico: http://www.fug.com.br/historico/html/freebsd/
> > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
-------------------------
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd