shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linhas múltiplas de 4


From: Molinero
Subject: Re: linhas múltiplas de 4
Date: Thu, 11 Dec 2008 21:25:50 -0200
User-agent: Thunderbird 2.0.0.17 (X11/20080914)

Pessoal,

 Gostaria de uma ajuda de vocês.
 Preciso fazer um script que leia um arquivo e de 4 em 4 linhas deste
arquivo e altere uma parte desta linha.

Ex.:
Arquivo_Original.txt
=== linha em branco ===
Nome: Nair
Sobrenome: Silveira
email: address@hidden
email: address@hidden
=== linha em branco ===
Nome: Carlos
Sobrenome: Martin
email: address@hidden
email: address@hidden
=== linha em branco ===
Nome: Lucia
Sobrenome: Andrade
email: address@hidden
email: address@hidden

Quero alterar o segundo "email" para "email_alternativo", ficando então:

Arquivo_Novo.txt
=== linha em branco ===
Nome: Nair
Sobrenome: Silveira
email: address@hidden
email_alternativo: address@hidden
=== linha em branco ===
Nome: Carlos
Sobrenome: Martin
email: address@hidden
email_alternativo: address@hidden

... e por ai vai.

Quebrei a cabeça e não consegui, por isso peço a ajuda de vcs.
Agradeço desde já !!!


======================================
                  CyberCrow
        Conhecimento é Poder !

  Quando voce perde a mente limitada
       Voce liberta a sua vida

  http://cybercrow.blogspot.com
======================================

   1. Try to find an answer by searching the archives of the forum you plan to 
post to.
   2. Try to find an answer by searching the Web.
   3. Try to find an answer by reading the manual.
   4. Try to find an answer by reading a FAQ.
   5. Try to find an answer by inspection or experimentation.
   6. Try to find an answer by asking a skilled friend.
   7. If you're a programmer, try to find an answer by reading the source code.

-----BEGIN GEEK CODE BLOCK-----
  Version: 3.12
  GCM/L/U d- s-: a- C++ LSU++++ P+ L+++ E--- W++ N w--
  O-- M- V- PS PE- Y PGP++ t 5 X++ R tv- b++ DI D+
  G++ e- h* r y+
-------END GEEK CODE BLOCK------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]