fertincome.blogg.se

Perl script
Perl script










#Perl script download#

Unfortunately, you will probably have issues accessing it with wget and curl, so if you are running a GUI-less Linux server, it may be easier to download off-box and then FTP/SFTP/etc. Download the Perl script and place it in /usr/local/binĭownload the makemyconfig Perl script from my Google Drive and copy it into /usr/local/bin on your Linux host. If I haven’t bored you already and you’re interested in giving it a shot, here are the steps to get it running.ġ. While this may seem much more complex than a text file with find and replace, I have found it to be very simple to use – especially when the outputted configuration file resides in a FTP directory that I can leverage to deploy the configuration to the target device. The script is basically run with the syntax, “ makemyconfig templatefile outputconfigfile.” M圜onfig.txt – This is the output file containing the configuration that I want to FTP/TFTP/paste to my network device.AccessSwitch.template – This is the template file that has the desired configuration, but denotes variables as text enclosed with “%” signs.It will be re-used by the Perl script regardless of what template is being used. This file is called directly from the Perl script – it isn’t passed as an input argument. For example, %user%=jsmith for the local username. nf – This is the file that contains default values that can be used for the referenced template.makemyconfig – Perl Script that is run to process a template text file, refers to a “defaults” file that has default values for some variables, prompts end-user for desired value of variables, and outputs to the desired configuration file.Linux and Perl setup are outside the scope of this blog. It’s not a perfect solution, so take it easy on me. While the script can work on multiple platforms, I will just provide instructions to set it up on a Linux box.

perl script

Personally, I tend to use the Perl script that I’m about to share with you.

perl script

There are even some deranged individuals that use word processor form letter / mail merge functionality. Engineers utilize Network Management Systems, text files with find & replace functionality, and homegrown scripts.

perl script

Everyone has their own method of leveraging configuration templates.










Perl script