Forum Discussion
5 years ago
Can confirm this removes the show running-config line:
cli.before().eachLine{ if(!(it=~/show running-config/)){ println(it) } }
Can you explain the it=~/show running-config/ part, so I understand what the code is doing?
Is the code defining "it" as the regex string "show running-config", but we are println(it) so it isn't defined as "show running-config"? I know it is printing when "it" is not "show running-config" but not sure how it is doing that.
Related Content
- 2 years ago
- 4 months ago
- 2 years ago