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
Ross
--
Ross Vandegrift
[email protected]
"If the fight gets hot, the songs get hotter. If the going gets tough,
the songs get tougher."
--Woody Guthrie
signature.asc
Description: Digital signature
_______________________________________________ juniper-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/juniper-nsp

