Ross,
On Tue, Feb 02, 2010 at 11:56:56AM +0100, Felix Sch?ueren wrote:
show arp no-resolve | match x/y/z | save tempfile
(which takes ~5 seconds on an ethernet router with just ~20k ARP entries)
start shell
awk '{print "clear arp hostname " $2}' < tempfile
and then copy-paste hundreds or thousands of "clear arp" lines.
A quick tip - JUNOS's cli is generally well-behaved shell, which means
you can just use cli in your pipeline. This will do it:
echo "show arp no-resolve" | cli | grep 'x/y/z' | awk '{ print "clear arp hostname
" $2 }' | cli
good tip. You don't have to echo | cli, "cli -c" works as well, so,
even shorter:
start shell
cli -c 'show arp no-resolve' | grep 'x/y/z' | awk '{ print "clear arp
hostname " $2 }' | cli
but I'd much prefer J fix clearp arp ;)
-f
--
Felix Schüren
Head of Network
-----------------------------------------------------------------------
Host Europe GmbH - http://www.hosteurope.de
Welserstraße 14 - 51149 Köln - Germany
Telefon: 0800 467 8387 - Fax: +49 180 5 66 3233 (*)
HRB 28495 Amtsgericht Köln - USt-IdNr.: DE187370678
Geschäftsführer:
Uwe Braun - Alex Collins - Mark Joseph - Patrick Pulvermüller
(*) 0,14 EUR/Min. aus dem dt. Festnetz, Mobilfunkpreise ggf. abweichend
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp