you can use regex to match and pipe length -- that should be equal to 3
regex_findall("flash:/c2960x-universalk9-mz.152-4.E7/c2960x-universalk9-mz.154-4.E4.bin")
| length
On Thu, Mar 4, 2021 at 3:24 AM Vikram S <[email protected]> wrote:
> When i use below command, it automatically copies image to ALL member
> switches and sets boot statement by itself.
>
> archive download-sw /leave-old-sw ftp://username:[email protected]
> /c2960x-universalk9-tar.154-4.E4.tar
>
>
> I need to write a script to verify that boot statement is automatically
> set in ALL member switches of a stacked switch after this copying. But
> problem is i can easily write it when the boot statement is only 1 line.
> But when it is in multiple lines as below (3 boot statement for 3 member
> switches), thenhow can i verify
> that'flash:/c2960x-universalk9-mz.152-4.E7/c2960x-universalk9-mz.154-4.E4.bin'
> exists on every line and not just in 1 or 2 lines?
>
>
> SWITCH#sh boot | i BOOT path-list
>
> BOOT path-list :
> flash:/c2960x-universalk9-mz.152-4.E7/c2960x-universalk9-mz.154-4.E4.bin
>
> BOOT path-list :
> flash:/c2960x-universalk9-mz.152-4.E7/c2960x-universalk9-mz.154-4.E4.bin
>
> BOOT path-list :
> flash:/c2960x-universalk9-mz.152-4.E7/c2960x-universalk9-mz.154-4.E4.bin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a473afb7-a028-4dcb-b22e-3149242db38bn%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/a473afb7-a028-4dcb-b22e-3149242db38bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Thanks,
Pushparaj G
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAE5Yv1SFgLsouu9%3DHJZdaVGOVPnnOzJZyoNFfdQk_vEXE0b9fg%40mail.gmail.com.