I'm not sure if this question is in the right place, so feel free to advise or move it :)
I'm changing some configurations on a bunch of routers (a LOT) so I've written some expect scripts. Its all kicked off by a script that reads an IP address from a file, and passes it to an expect script that logs on to the router who's address it is, then opens a third file which consists of a series of plain-language IOS commands. The commands are issued to the router and the config is done. Nothing clever here, its been done a few times before. However, I'm trying to write a Login Warning banner. The banner command goes across OK, the first line of the banner goes across, then the script hangs. I *think* its because after each line within the "banner" config, there is an "empty" newline, nothing to trigger the expect script driving the commands, so it sits there waiting for something that never comes.
I've tried making the banner command a single line with "\n" separating it into the format I want, that doesn't work. I also tried with 0x0a (ascii newline) but that didn't work either.
has anybody done this successfully, and where am I going wrong?
OK, I fixed it. Expect is waiting for the # prompt before it provides the next line. If you end each line of the banner with a #, it works, even though the C/R and # are round the wrong way. It may not be the most tidy programming but it works
The cat's out of the bag! In October 2020, Cisco announced the Next Generation of Enterprising Routing Platforms: the Catalyst 8000 Edge Platforms Family including the Catalyst 8200, Catalyst 8300, Catalyst 8500, and Catalyst 8000V. The new family of Cats...
Community Live- Smart Licensing Using Policy (Routing) – A Simplified Licensing Approach
(Live event - Tuesday, 18 May, 2021 at 9:00 am Pacific/ 1:00 pm Eastern / 7:00 pm Paris)
This event will have place on Tuesday 18th, May 2021 at 9:00 hrs PDT&nb...
Welcome to the overview guide that covers the latest in Cisco Networking and Data Center innovations and new product introductions. You'll find information on Intent Based Networking updates, special promotions and free trials, as well as exclusive upcom...
Listen: https://smarturl.it/CCRS8E13 99% of organizations use certifications to make hiring decisions. The reason is simple: Cisco certifications bring valuable, measurable rewards to certified IT professionals and the organizations that employ them....
Cisco AI Endpoint Analytics – Deployment guide
This deployment guide is meant for Cisco AI Endpoint Analytics adoption for customers, partners and everyone focusing on Endpoint Visibility and to how achieve it with Endpoint Analytics. It has sections that...