I have a config change template to generate MAC and ARP xml files on Juniper EX switches. Here's the pertinent snippet:
When I execute it on a switch it shows the commands as:
display xml | tee @ARPfile show ethernet-switching table | match ge- | display xml | tee @MACfile exit |
If I flip the command order, whichever one is on top will be trunkated to the first pipe, but the one below will be fine. I tried adding a trivial command to the top as well and the first section preceeding a pipe gets truncated.
For instance:
{ show ethernet-switching table | match ge- | display xml | tee @MACfile show arp | display xml | tee @ARPfile exit } } |
Becomes
match ge- | display xml | tee @MACfile show arp | display xml | tee @ARPfile exit |
And this:
{ clear system commit show ethernet-switching table | match ge- | display xml | tee @MACfile show arp | display xml | tee @ARPfile exit } } |
Becomes
clear system commit match ge- | display xml | tee @MACfile show arp | display xml | tee @ARPfile exit |
Thinking it might be just a display glitch in the Orion console I run it and it only generates the second file and shows a transfer error in Orion.
I can "fix" it by adding a pipe at the beginning of the first line with pipes. This generates both files but still shows a transfer error.
The "fix"
{ | show arp | display xml | tee @ARPfile show ethernet-switching table | match ge- | display xml | tee @MACfile exit } } |
This is mildly infuriating. Any ideas why this might be happening?
Thanks.