Skript-Schnipsel

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:48, 29 July 2005 (edit)
213.139.154.67 (Talk)
(Welche IPs haben die Wireless- Clients? - typo)
← Previous diff
Revision as of 01:03, 29 July 2005 (edit) (undo)
213.139.154.67 (Talk)
(Welche IPs haben die Wireless- Clients?)
Next diff →
Line 153: Line 153:
Dieses funktioniert allerdings nur, wenn der Wireless Client eine IP vom DHCP Server bekommen hat (daher dumpleases) Dieses funktioniert allerdings nur, wenn der Wireless Client eine IP vom DHCP Server bekommen hat (daher dumpleases)
 +<pre>
wl assoclist | awk '{print$2}' > /tmp/assocLIST wl assoclist | awk '{print$2}' > /tmp/assocLIST
while read assocLINE while read assocLINE
do do
- dumpleases | grep -i $assocLINE | awk '{print "hostname: " $1, "MAC: " $2, "IP: " $3}'+ dumpleases | grep -i $assocLINE | awk '{print "Hostname: " $1, "MAC: " $2, "IP: " $3}'
done < /tmp/assocLIST done < /tmp/assocLIST
 +</pre>
 +
 +Output:
 + Hostname: tp MAC: 01:81:18:3d:49:5e IP: 192.168.2.101
 +
 +$1, $2, $3 lässt sich dabei in der Reihenfolge vertauschen oder teilweise weglassen:
 +
 + ....awk '{print $1,$3}'
 +
 +Output:
 + tp 192.168.2.101
===Traffic Schnipsel=== ===Traffic Schnipsel===

Revision as of 01:03, 29 July 2005