Request assistance to extract partial output using RegEx

8 views
Skip to first unread message

Vikram S

unread,
May 17, 2021, 10:51:51 PM5/17/21
to Ansible Project

When i give 'sh version | i System image' in cisco router, it shows me below output. How do i extract only the image name - 'isr4300-universalk9.16.12.01.SPA.bin' from below output?

ROUTER#sh version | i System image 
System image file is "bootflash:isr4300-universalk9.16.12.01.SPA.bin"
  

I need to extract in order to set boot statement of router. Setting boot statement is written using below command. So please guide me on how to paste extracted output after 'boot system flash bootflash:' using ReGex or some other module?

boot system flash bootflash:isr4300-universalk9.16.12.01.SPA.bin

Thanks,
Vikram
Reply all
Reply to author
Forward
0 new messages