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

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

[no subject]



>From address@hidden Wed Dec 06 21:52:13 2017
Return-Path: <address@hidden>
X-Sender: address@hidden
X-Apparently-To: address@hidden
X-Received: (qmail 20371 invoked by uid 102); 6 Dec 2017 21:52:12 -0000
X-Received: from unknown (HELO mtaq1.grp.bf1.yahoo.com) (10.193.84.32)
  by m2.grp.bf1.yahoo.com with SMTP; 6 Dec 2017 21:52:12 -0000
X-Received: (qmail 24038 invoked from network); 6 Dec 2017 21:52:12 -0000
X-Received: from unknown (HELO mta1006.groups.mail.bf1.yahoo.com) 
(98.139.245.165)
  by mtaq1.grp.bf1.yahoo.com with SMTP; 6 Dec 2017 21:52:12 -0000
X-Original-Return-Path: <address@hidden>
X-Received-SPF: pass (domain of yahoo.com.br designates 74.6.132.43 as 
permitted sender)
X-YMailISG: Uq8kRxAWLDtyh4d.Tr5HrTnHg62gg8sqpAQQlhRqOp5ZcDgp
 VsvBrSgHrxQNhFybsgopAKPxHf1Rosx5OLFvApGNQ79sseN0axO8IbnvrIqQ
 CPt7j5w5uXvVnaUkDotsdq_orgnoA5G1oFV8EqknvVA02QutzN_xiEZQlZ91
 XeypdLybra9wem2YQMki4BEEezLjYV_JbDmrLiN8Wxns6BgPHlCY107q0ZbE
 Pmnan1asZbO4gpWLYKYWOvfRJPoZlE89RoBoDw5MA6EA9Y1RMcTG61ReriGB
 PB5ZwCcq3qYE2UD84F.1tWwPdAPklpnCJmXaVxOymi7Ve3OJ5yPZKphEKb21
 uvzqc4vCfwtDN1WX42kNLbVJq9eToGxcooi1Nypp1Mg.mHChYqrq0MDrq3cB
 PjA9uhKiP.qTqjIsX7bSN0iMAl1iw2uOw1Uxp0bYaxf95t9KWPkXM9V6Je3.
 KAGFONJ7AF1dK7ITX45TNWovOIgDctldSFAdNAekaG91JKuDjuIHz7KrEBCO
 IMDzTl2xmlZEc9slFD.XYdr4PNqWiazmcgnc95nU35EZiLwUxJfF.lNCbfKF
 Kde8cYuBEsTa.0kau7uyaj_1acumVVtKXVNaUlNaoP8Jgca6yi9kn4D.rHky
 eko9_59G8FltTJ3fwhdhNUXaTWVvJ0fXm6BLrk5.df1GobEvMAVTN3GwYO5y
 g2H5Xt1fkXNddC4opPnWOeBYzsYrc5i4GvGOhdS.Fi_rcddzCvvEr5dbfAUm
 PG7p.KyKVnKWeY5Ulj1tkDO_UspkkrT5w7AGD2tNn_y4irGf98xKnkiJBTEy
 bKUHOKr7WlKvekXXogus8OAZ.l1s_VHiq03weRaicI8RPtp7J.Aavqv1NELO
 UzMXvNIaAxjJEEt18Dc6eP1Ania7ptdfYLiZt_es3UaYm.aoVFLm0B21UCFI
 eal7TOT9poQUQTTEBg3wT.wmh9FpLO63fW5716zNvZ6bcVga0epHfdpje2Ng
 cDETNrHgme9mk0ZQVge.YKlran2zDsik1HIP4di2PCkmQ_3rGDN5.XJr72U6
 o3jftUWSyclPLhiGrK4gGieJzqnI8sDrTBojf5uKxfZefvYS0TSkg2dZu1TV
 gWnJp3j6RIhwc.jrtQXvoyJ.X1NnAEWgrbRneaU0llEezWHgaWm4CG1aA2iz
 oliel54xjYcliJAjRq2chjAjESuv1ts0nS4i0g--
Authentication-Results: mta1006.groups.mail.bf1.yahoo.com  from=yahoo.com.br; 
domainkeys=neutral (no sig);  from=yahoo.com.br; dkim=pass (ok)
X-Received: from 127.0.0.1  (EHLO sonic306-4.consmr.mail.bf2.yahoo.com) 
(74.6.132.43)
  by mta1006.groups.mail.bf1.yahoo.com with SMTPS; Wed, 06 Dec 2017 21:52:12 
+0000
X-YMail-OSG: qJF8JiUVM1mwlOty8_oXVgFEKCiIct9CVmk94DKV7jG6u0ZIsmAfoTcMGqbYbjF
 1.Z77.ZHJRDlhzXuNS24p95FfekB4BjDRWbqfyJWUtYxQ0qgLvKMhZUeGE5I4K_O.hAXvr85pBWV
 mygc6ku0C9yYljSd3Q.aZ1XgBuZYwiwnPtO15bDX9fW04AAAWnNAVBlH6u19YV2l6aHp_rcAj8ie
 YFaT2M663WwWhjGf6lPgrnEGhiO5_aTKN4S75h6g48N.wXXgU40c5nCtxEVhF8Te8EnRO6a4ofG.
 9ODIzndf.Su9g8JNQozM9PDX6I8CuzB8oTsehw_ho9QxZ.1N5OP1HTmhS1f4iJc_zyeMqozv0qtd
 wQ9ZrvwZoLD3cjQnTXJItOH.YGqzXl8..shC4qmdJil5i2r0sZb4KzSCJgcCmmQ4vcPXnkimc8.9
 ToXY2KqIyYPwP8Gt5enAkxEOmTbENFYE549axQTzBjKMNjP65Bkk4zNlApFlheMCivHmPxsBotQ.
 tn_Vcd7V_NCA-
X-Received: from sonic.gate.mail.ne1.yahoo.com by 
sonic306.consmr.mail.bf2.yahoo.com with HTTP; Wed, 6 Dec 2017 21:52:12 +0000
X-Received: from smtp104.rhel.mail.bf1.yahoo.com (EHLO paulo.bfw) 
([98.139.230.215])
          by smtp408.mail.bf1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 
-92448808
          for <address@hidden>;
          Wed, 06 Dec 2017 21:52:12 +0000 (UTC)
To: address@hidden
References: <address@hidden>
Message-ID: <address@hidden>
Date: Wed, 6 Dec 2017 19:52:09 -0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: pt-BR
Content-Transfer-Encoding: 8bit
X-Originating-IP: 98.139.245.165
Subject: =?UTF-8?Q?Re:_[shell-script]_AWK_-_Formata=c3=a7=c3=a3o_de_dados?=
X-Yahoo-Group-Post: member; u=558780791; 
y=lgZDORNwn8IxsvwPN5_yWcg6d_6wBFl6SUNafc6LGBg9TkKboUvDRW4
X-Yahoo-Profile: phfbettega
From: address@hidden

Olá andrelucio, teste o campo do mac, se é realmente um mac.

awk 'gsub("SA:|dB","") {if ( $16 ~ /^([a-f0-9]{2}:){5}[a-f0-9]{2}$/ ) print 
$1","$16","$10","$2}' unknow.txt

Abraços Paulo

On 06-12-2017 18:46, address@hidden [shell-script] wrote:
> Opa, pessoal.
> 
> 
> Estou com a seguinte demanda. Eu tenho um arquivo que me envia a saída 
> abaixo:
> 
> 
> city-country-1 17:38:29.291991 26205766340us tsft 1.0 Mb/s 2412 MHz 11b -84dB 
> SIGNAL [bit 29] 
> BSSID:4c:5e:0c:b9:69:59 (oui Unknown) DA:4c:5e:0c:b9:69:59 (oui Unknown) 
> SA:80:58:f8:81:29:89 (oui Unknown) 
> Packet Request (Network) [1.0 2.0 5.5 11.0 Mbit]
> 
> city-country-2 17:38:33.183062 26209656603us tsft 1.0 Mb/s 2412 MHz 11b -79dB 
> SIGNAL [bit 29] BSSID:Broadcast 
> DA:Broadcast SA:68:c4:4d:60:8d:48 (oui Unknown) Packet Request () [1.0 2.0 
> 5.5 11.0 Mbit]
> 
> city-country-3 17:00.22.183062 26209656603us tsft 1.0 Mb/s 2412 MHz 11b -79dB 
> SIGNAL [bit 29] BSSID:Broadcast 
> DA:Broadcast SA:67:c4:d5:60:8f:38 (oui Unknown) Packet Request () [1.0 2.0 
> 5.5 11.0 Mbit]
> 
> 
> E extraio os dados abaixo com o seguinte comando:
> 
> 
> awk 'gsub("SA:|dB","") {print $1","$16","$10","$2}' unknow.txt
> 
> 
> city-country-1,Unknown),-84,17:38:29.291991
> 
> city-country-2,68:c4:4d:60:8d:48,-79,17:38:33.183062
> 
> city-country-3,67:c4:d5:60:8f:38,-79,17:00.22.183062
> 
> 
> O problema é que no campo 16, eu preciso que somente venha o MAC, e que não 
> aparece  um resultado diferente, 
> como o Unknown) na saída acima. Preciso que saia dessa forma:
> 
> 
> city-country-2,68:c4:4d:60:8d:48,-79,17:38:33.183062
> 
> city-country-3,67:c4:d5:60:8f:38,-79,17:00.22.183062
> 
> 
> Ps: Preciso que seja feito através do awk.
> 
> 
> 
> Agradeço a ajuda.
> 
> 
> 
> --------------------------------------------------------------------------------------------------------------
> Enviado por: address@hidden
> --------------------------------------------------------------------------------------------------------------
> Responder através da web 


reply via email to

From: Unknown
[Prev in Thread] Current Thread [Next in Thread]