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

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

Re: [shell-script] ler e alterar dados.


From: Tiago Barcellos Peczenyj
Subject: Re: [shell-script] ler e alterar dados.
Date: Mon, 8 Jan 2007 13:42:13 -0200

Alem da solução com SED vc pode usar o cut

$ echo "0304050607080901020012" | cut --output-delimiter=';' -c1-4,5-8,9-10,11

0304;0506;07;080901020012

$ cut --version
cut (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David Ihnat, David MacKenzie, and Jim Meyering.

On 1/7/07, Vinicius Marques <address@hidden> wrote:






Srs,
 Estava com um probleminha no meu script que era o seguinte.
 Ao ler os dados de um outro script 0304050607080901020012 tudo bem
 porém acho que ja estava cansado e sem nenhuma ideia a mais e nao estava
 mais produzindo nada....
 nao estou conseguindo acrescentar no 5 byte um " ; " na oitava posição
 tb e na decima novamente. Será que alguem poderia
 me dar uma ajudinha.
 [ ] ´s
 Vinicius

                
 _______________________________________________________
 Yahoo! Mail - Sempre a melhor opção para você!
 Experimente já e veja as novidades.
 http://br.yahoo.com/mailbeta/tudonovo/





--
Tiago B Peczenyj
Linux User #405772

# cd /pub
# more beer


reply via email to

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