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

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

Re: [shell -script ] - Dúvida Vinicius


From: itamarnet
Subject: Re: [shell -script ] - Dúvida Vinicius
Date: 01 Oct 2015 08:33:04 -0700

Vinícius

Eu já tive um problema parecido e usei um script simples em awk, é apenas uma possível solução.
Adaptando um pouco a sua situação veja se isso serve.

awk '
 BEGIN { FS=OFS=";" }

 {
   if ( substr(ant,1,15) substr(ant,23) != substr($0,1,15) substr($0,23) && length(ant)>0 ) { print ant }
   ant=$0
 }

 END { if (length(ant)>0) print ant }
' arquivo

[]'s
Itamar

reply via email to

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