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

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

Ajuda com formatação


From: edmundo_goncalves
Subject: Ajuda com formatação
Date: Mon, 30 May 2011 04:08:42 -0000
User-agent: eGroups-EW/0.82

Olá pessoal !

Sei que na lista isso ja foi comentado mais realmente nao consegui 
fazer...tenho um arquivo chamado w.txt com o seguinte conteudo

Station 00:25:56:ba:9f:d0 (on wlan0)
        inactive time:  20 ms
        rx bytes:       49312412
        rx packets:     332439
        tx bytes:       90752756
        tx packets:     270905
        signal:         -39 dBm
        tx bitrate:     11.0 MBit/s
Station 00:25:d3:4c:ca:ce (on wlan1)
        inactive time:  1716 ms
        rx bytes:       32141
        rx packets:     919
        tx bytes:       30319
        tx packets:     343
        signal:         -90 dBm
        tx bitrate:     1.0 MBit/s


criei o script...

#!/bin/sh                                                             rm -f 
w.txt                 
iw wlan0 station dump >>w.txt       
iw wlan1 station dump >>
interface="$( cat w.txt | grep "Station" | cut -c31-35 )"
station="$( cat w.txt | grep "Station" | cut -c9-25 )"
signal="$( cat w.txt | grep "signal:" | cut -c9-25 )"
bitrate="$( cat w.txt | grep "tx bitrate:" |cut -c14-22 )"

echo " Interface    | Station    | Signal   | Tx BitRate"
echo "---------------------------------------------------"
echo   $interface      $station    $signal     $bitrate

Como faço para que o resultado fique 1 em cada linha no caso wlan0 em uma wlan1 
em outra e em cada linha esses 4 valores

Obrigado a todos!



reply via email to

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