|
From: | Cyolfi Cyro |
Subject: | Re: [shell-script] Ajuda com Sed ou Tr |
Date: | Mon, 30 Mar 2015 09:49:20 -0300 |
Eu consegui com o comando: sed -i '/11$/N;s/\n//' arquivo.txtAté mais.--Em 30 de março de 2015 08:54, 빠는 Leonardo Goretti address@hidden [shell-script] <address@hidden> escreveu:cat teste | sed "N;s/\n/ /" > teste.saidaEm 30 de março de 2015 08:28, Cyolfi Cyro address@hidden [shell-script] <address@hidden> escreveu:Senhores, pesquisei mas não consegui elaborar a solução, tenho um arquivo com uma 10.000 linhas com esse formato:111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11222;22-22-2222 22:22:22;2B111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11222;22-22-2222 22:22:22;2B111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11222;22-22-2222 22:22:22;2BQuero juntar as linhas da seguinte forma:111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11 222;22-22-2222 22:22:22;2B111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11 222;22-22-2222 22:22:22;2B111111111A;-11.111;-11.111;Xxxxxx;11-11-1111 11:11:11;11-11-1111 11:11:11 222;22-22-2222 22:22:22;2BGrato por qualquer ajuda.Cyro Ciolfi
Divisão de Suporte Computacional - CTI Renato ArcherProfessor - Metrocamp--Leonardo Goretti
Celular: +55 (61) 9375 3366
Gtalk: address@hidden----------------------------------------------Carlos Alberto Teixeira Magalhães
Analista de Suporte IIIDepartamento de Informática - DIUniversidade Estadual do Ceará - UECE
A aplicação pediu: "Requires Windows XP, Vista, 7 or better". Então eu instalei Linux.A Ciência da Computação nasceu para resolver problemas que não existiriam se não fosse o computador.
[Prev in Thread] Current Thread [Next in Thread]
- Ajuda com Sed ou Tr, Cyolfi Cyro, 2015/03/30
- Re: [shell-script] Ajuda com Sed ou Tr, Carlos Alberto Teixeira Magalhães, 2015/03/30
- Re: [shell-script] Ajuda com Sed ou Tr, 빠는 Leonardo Goretti, 2015/03/30
- Re: [shell-script] Ajuda com Sed ou Tr, Carlos Alberto Teixeira Magalhães, 2015/03/30
- Re: [shell-script] Ajuda com Sed ou Tr, Cyolfi Cyro <=
- Prev by Date: Re: [shell-script] Ajuda com Sed ou Tr
- Next by Date: nohup com shell
- Previous by thread: Re: [shell-script] Ajuda com Sed ou Tr
- Next by thread: nohup com shell
- Index(es):