Hi,
I need to perform checks against two files. I've searched the boards but have not found a simple solution.
Ideally I need to compare the files and have the output show whats missing or extra in one and visa versa. I thought this would be nice and simple using diff , but its proving complicated. (Its also been a long week and the brain is shutting down) ;-)
Sample of problem:
One file, the static source file(FILE_A) contains the following:
access-list 199 permit eigrp any any
access-list 199 permit ospf any any
access-list 199 permit tcp any any eq bgp
access-list 199 permit tcp any eq bgp any
access-list 199 permit udp any any eq rip
access-list 199 permit udp any eq rip any
access-list 199 permit udp any eq rip any eq rip
The other file (FILE_B) contains :
access-list 199 permit 9 any any
access-list 199 permit eigrp any any
access-list 199 permit tcp any any eq bgp
access-list 199 permit tcp any eq bgp any
access-list 199 permit ospf any any
access-list 199 permit udp any eq rip any eq rip
If I do a simple diff on it I get this output:
1d0
< access-list 199 permit 9 any any
2a2
> access-list 199 permit ospf any any
5c5,6
< access-list 199 permit ospf any any
---
> access-list 199 permit udp any any eq rip
> access-list 199 permit udp any eq rip any
The problem is clear above.. sorting the files 1st will help resolve some of them but could still cause problems further on.
Is there a simpler way to get to my objective?
Thanks .. TJ
I need to perform checks against two files. I've searched the boards but have not found a simple solution.
Ideally I need to compare the files and have the output show whats missing or extra in one and visa versa. I thought this would be nice and simple using diff , but its proving complicated. (Its also been a long week and the brain is shutting down) ;-)
Sample of problem:
One file, the static source file(FILE_A) contains the following:
access-list 199 permit eigrp any any
access-list 199 permit ospf any any
access-list 199 permit tcp any any eq bgp
access-list 199 permit tcp any eq bgp any
access-list 199 permit udp any any eq rip
access-list 199 permit udp any eq rip any
access-list 199 permit udp any eq rip any eq rip
The other file (FILE_B) contains :
access-list 199 permit 9 any any
access-list 199 permit eigrp any any
access-list 199 permit tcp any any eq bgp
access-list 199 permit tcp any eq bgp any
access-list 199 permit ospf any any
access-list 199 permit udp any eq rip any eq rip
If I do a simple diff on it I get this output:
1d0
< access-list 199 permit 9 any any
2a2
> access-list 199 permit ospf any any
5c5,6
< access-list 199 permit ospf any any
---
> access-list 199 permit udp any any eq rip
> access-list 199 permit udp any eq rip any
The problem is clear above.. sorting the files 1st will help resolve some of them but could still cause problems further on.
Is there a simpler way to get to my objective?
Thanks .. TJ