- or download this
#!/usr/bin/perl
...
open FH, "< $template" or die "Couldn't open the file $template\n";
@template = <FH>;
close FH;
- or download this
for ($counter=0; $counter<$total; $counter++) {
foreach (@template) {
...
print $_;
}
}
- or download this
enable config protocol mpls lsp name __replaceme__
- or download this
# ./create_rsvp_lsp.pl -template lsp_template.tpl -replacement "__name
+__" -prefix "lsp_to_1.1.118.152" -total 5
enable config protocol mpls lsp name lsp_to_1.1.118.152-0
...
enable config protocol mpls lsp name lsp_to_1.1.118.152-0
enable config protocol mpls lsp name lsp_to_1.1.118.152-0
enable config protocol mpls lsp name lsp_to_1.1.118.152-0