Baseline template - look for specific loopback interface when specifying "ip tftp source-interface"

Hello all
I'm new to regex and I'm trying to make a baseline template, that will check our network devices for our required basic configuration.
What I'm trying to do is to make a template that will look for either a loopback0 or loopback1 interface.
If eíther one is found (the loopback interfaces will not be there at the same time) it must apply the following command:
ip tftp source-interface loopback0 (or loopback1)
Is it even possible to make an if-then statement using regex?
Thank you in advance.
Best regards
Jesper Ross Petersen
Message was edited by: Jesper Ross Petersen

Yes, this can be done
#Go to the tcl shell of the device.
C1811#tclsh
C1811(tcl)#
#copy and paste this at the tcl prompt.
proc intf {} {
set runningcfg [exec show run | inc ^interface Loopback]
foreach line [split $runningcfg \n] {
if {[regexp {interface (Loopback[0-1])} $line -> interface] } {
ios_config "ip tftp source-interface $interface"
return "ip tftp source-interface $interface"
# now type the name of the proc (intf) at the tcl prompt.
C1811(tcl)#intf
# If loopback0 or 1 is present the tftp source interface is added to the running config.
ip tftp source-interface Loopback0
C1811(tcl)#

Similar Messages

  • One question I am looking for help with is, when you hit the history button I want my last fifty pages to show up instead of just fifteen. Is it possible to

    one question I am looking for help with is, when you hit the history button I want my last fifty pages to show up instead of just fifteen. Is it possible to change that setting?
    TY

    The History menu can only show that fixed maximum of 15 as that is hard coded.
    Maybe this extension helps:
    *History Submenus Ⅱ: https://addons.mozilla.org/firefox/addon/history-submenus-2/

  • HT1620 Where do I look for the security key when I download an item.  Your website says your key is 0xD0261077

    Where do I look for the security key when I download an item.  Your website says your key is 0xD0261077?

    Your question is somewhat terse, and I might infer you're conflating the PGP key used for Apple security-related email communications with cryptographic hashes (message digests) used to verify the integrity and the origin of files, and with digitally-signed binaries.  While these areas are somewhat related, details vary.  (If you're already familiar with this stuff, my apologies.)
    The Apple PGP key is used to sign (verify) messages from the security folks at Apple, and can be to encrypt messages sent to the Apple security folks.  See this Apple Security PGP web page for details on using the PGP key for message verification and for message encryption.
    File downloads are implemented differently, and will generally involve a particular cryptographic hash or message digest (and not necessarily a PGP key), and what might be used used varies by the particular website and the download involved, with some sites using the older and insecure MD5, and with others increasingly using some variation of the less-insecure SHA cryptographic hash.  Depending on the scheme used, these can protect against corruptions, or can also be used to sign the binaries.  The system that Apple is encouraging developers to use is called Developer ID.
    Shell commands used and useful here include md5 and various openssl commands for the sha hashes/digests.
    If you have a particular public web site or file download, post a pointer and I'll have a look.

  • I purchased an Iphone 5 and I'm looking for a car charger, when will they be on the market?

    I purchased an Iphone 5 and I'm looking for a car charger, when will they be on the market?

    AppleIsMyHobby wrote:
    I would just advise that you be careful with old model chargers that were built for 30 pin to USB connectors for the old iPhones. They may not work for the iPhone 5 and/or they might damage the phone/battery etc. The best plan would be to wait for some kind of charger that was made for the iPhone 5.
    Nonsense; USB outputs are an industry standard, there is no danger in using a USB to Lightning cord to charge your iPhone 5.

  • Microsoft Exchange 2013 eDiscovery - specific search query: looking for specific hyperlinks within e-mails content/body

    Dear all:
    I am currently using the MS Exchange 2013 eDiscovery feature with the objective to identify which of my users have received emails containing specific hyperlinks (e.g. http://website1/webroot/file.zip, http://website2/webroot/file.zip, etc.) from an unknown
    sender.
    To this end, I have been creating an eDiscovery on-hold case looking for a specific search criteria in all mailboxes.
    As the search criteria, I have tried many options but was unable to obtain satisfying results: I know I am missing some e-mails from this specific search (I checked manually). I have notably tried the following search queries (with and without the body:
    search operator, with and without double quotes, etc.)
    body:http://website1/* OR body:http://website2/*
    body:"http://website1/*" OR body:"http://website2/*"
    body:"website1*" OR body:"website2*"
    body:"*website1*" OR body:"*website2*"
    When replaying these queries on my local Outlook client, everything works fine and I get results as expected.
    However, when going through the ECP eDiscovery feature, I am missing some results.
    Therefore, I am looking for any advice on what Exchange eDiscovery KQL query I should use to identify all emails containing, in their message body, a list of specific hyperlinks/URLs.
    Many thanks in advance for your help.
    S.

    Alas I do not know the answer to resolution via ECP and like you I have found it to be a bit maddening to use ECP for discovery tests Ive done when comparing results with our DigiScope product.  I know we can accomplish what your looking to do via Regular
    Expression but again that's with a 3rd party tool. 
    One thought is I suppose it could be an indexing issue with the DB, so perhaps rebuilding the index would help?
    If you do get it working I would love to know the resolution since many of my tests with ECP have left me yelling at the screen.  When its works its cool when not well...
    Search, Recover, & Extract Mailboxes, Folders, & Email Items from Offline Exchange Mailbox and Public Folder EDB's and Live Exchange Servers or Import/Migrate direct from Offline EDB to Any Production Exchange Server, even cross version i.e. 2003
    --> 2007 --> 2010 --> 2013 with Lucid8's
    DigiScope

  • Look for specific message in iMessage

    Hi!
    Im looking to get a script going that looks in the background for a message to arrive, and when it does it should delete a file or program.
    I've made some scripts that sends messages, but not worked with receiving.
    The script should look for a text being received from a certain contact and see if it contains a certain text.
    If both is correct, then execute the row that deletes the file.
    I tried to see if i could get the most fundamental working, but quickly failed.
    tell application "Messages"
      if lastmessage is "1234123" then
      display dialog "Start "
      end if
    end tell
    Althou "lastmessage" was not a variable.
    The text in the message can be predefined and the program/file that should be deleted can also be predefined.
    OS X 10.10.1
    Any ideas?
    Thanks!

    Not exactly.  The form is located in a read only dedicated server accessible by local users from within the companie.  Althought we urge our user to use the form from our servers by creating a Shortcut on their local desktop pointing to the original file, some of them less familiar with computers have tendencies to use a COPY of the original file instead of a SHORTCUT.  The problem with this is they do not benefit from the latest version of the form as I modify it from time to time on the server.  So when they contact me with any problem or bug they encounter, the first thing I do is check the value of a hidden text field I placed in the bottom corner named "VERSION" that hold the version number I change every time I make a new release to see if they used an obsolete version.
    What I imagined is the following.  From now on, I would place a script at doc open that does the following:
    var myVersion = this.getField("VERSION").value;
    var latestVersion = Something to check the value of the field named "VERSION" in the form located on the server;
    if (myVersion != latestVersion){
         app.alert("obsolete..blah, blah, blah");
    Maybe there is a better approach to what is basically a version checker at doc open.  Users will be using Reader and I have access to users local machines and folders.

  • BATCH CAPTURE TAPELESS workflow still FCP is looking for a capture device when going ONLINE

    Hi,
    I am working on a documentary and about to go online with my edit.
    I used Sony FS100. Tapeless. I did Log and Transfer to ProRes 422 in FCP 7.
    Later when I run out of space I used Media Manager to RECOMPRESS everything to ProRes Proxi. Worked well.
    But now when I try to batch capture to ProRes 422 FCP is looking for a capture device thinking I am working with tapes.
    How do I make FCP undrerstand I am tapeless? Does the recompress kill the possibility of bach capturing back to online full quality 422?
    Thanks for the support!
    Gabor

    I have read through some more forums and I only found one mention of the Media Manager 'Recomress' function.
    It said:
    "Transcoding with MM (recompress). It preserves timecode/reel name, file names, etc... Except the clip ID, which is used along with reel name and timecode to batch capture from source files (at least for P2)."
    Clip ID is the metadata relyable for the work of batch capture. It seems without it it is impossible to batch capture.
    I wonder why they designed Recompress like that, if it is true?

  • RAZR HD, why does my phone look for a Wi-fi when I am going onto the internet?

    My Droid 3 seemed to have a better connection to the internet and I never had to set up a Wi-Fi connection.
    Any advice?

        Ahauben4, that's a great question and I'm sure we can figure this out! Just to clarify, is your phone asking you to connect to to a WiFi network because one is available or is it saying no 3G/4G connection available? If you have WiFi turned on, it will always look for available connections. Please turn off WiFi in Settings, Wireless & Networks. If you're having problems connecting to internet over 3G/4G, what city and state are you located in?
    MarquiaF_VZW
    Follow us on Twitter @VZWSupport

  • Looking for specific cable

    I just looked in the store and Apple doesn't seem to sell this, but I am looking for a female/male connector cable. Essentially, I need a cable that replicates an iPhone dock at one end (male) and then plugs into the dock with the female end so I can tether my iphone to my dock. The reason is I can't fit the phone in the dock with the protective cover and it's a pain to remove every morning, as well as the fact that it eventually stretches the plastic cover out taking it off and on repetitively.
    If you've seen one of these somewhere, please let me know.
    Thanks

    EllsbirdAgain,
    There is two ends, one that goes into the dock, one that goes into your computer. The end currently connected to your dock is a dock connector. The other end is a USB connector that goes into your computer.
    The one that goes into the dock can also connect directly to your iPhone.
    Essentially I am recommending bypassing the dock if your case gets in the way of using the dock.
    This is page on the Apple Store online shows what both ends look like:
    http://store.apple.com/us/product/MA591G/A (Note: That is the replacement cable for what came with your iPhone)
    Hope this helps,
    Nathan C.

  • Looking for specific tutorials...

    Here's what I'm looking for:
    http://www.groceryshopping.net/brands/index.html
    Does that have a "trade name" so I can be more successful
    googling for tutorials? Play the branding tab... In particular I'm
    looking to do the left-nav thing which loads different stuff center
    court.
    Any suggestions outside of just start playing with it and try
    to become good?
    Thanks in advance!

    There's no 'trade name' there... it's just a menu playing
    some video clips.
    You'll want info on playing video in Flash and creating
    buttons. There are
    many tutorials on playing video, doing a couple of those
    should get you the
    grounding you need.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • PDF template - Looking for syntax to handle non-nesting repeat groups

    All,
    I followed XML publisher documentation for the first repeat group using BODY_START, T1_G1, T1_G2,,,,BODY_END. It works as expected. Could anyone post the syntax to handle more than one repeat group within a PDF template. These are not nesting repeat groups.
    Really appreciate any help to point me in the right direction.
    Thanks in advance
    Gopal

    Your question was "... but the font on the footer is much larger than that of the template", yes?
    I only can repeat, look at the difference of:
    1. index.html (Font-size > medium) >
    2. Calendar.html (Font-size > no entry):
    > "... font on the footer is much larger than that of the template",
    Hans-Günter
    P.S.
    See us again - maybe - at Monday > we will do a nice little trip to Austria.

  • Year specific printers were manufactured in. Looking for specific printer. HELP!

    I had a old printer and gave it away.  I have a c7280 now and love it but it seems the printer I purchased in 2005/2006 and a LOT cheaper had far better photo quality.  I have gotten deeper into my photography work and would like to get my hands on one or more of those printers BUT I cannot remember the model #.  I do believe the letter v was in it.  It was either a photosmart or deskjet.  Purchased at Walmart for around $110.00.  The body of it is blue and the scanner lid was a greyish silver.  I have looked at the 2110 and 2210 which are close but still don't seem right.  I have called HP and they are no help.  Can anyone help me PLEASE?  Thank you!

    Connect wireless printer anywhere, convert from wired, bypass failed radio, add WPA2 security.
    http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/Connect-your-wireless-printer-when-away...
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Looking for specific case for iPod touch to

    I saw this awesome case for an iPhone, it was pretty thick, made of rubber I think. The feature that blew me away was that in the back panel of the case was a place to wind up the ear phone cord, and two notches for the ear buds to snap in, and they seemed pretty flush with the case when in them. Even though it was for an iPhone I was curious if they had one for iPod touch, I couldn't find anything like it in the Apple Store. Does anyone know the one I'm describing?

    I think this is the case you're describing:
    http://www.nextdaypc.com/main/products/details.aspx?PID=4067661&rsmainid=ND01300 14

  • I need to know what to look for on the toolbar when I am looking for a "secure site icon" such as the locked padlock on Internet Explorer

    We are unable to identify when we are on a secure site as we can when using Internet Explorer.

    Firefox 3 stil has the padlock in the right corner of the Status Bar (View > Status Bar).<br />
    Firefox 4 won't have the Status Bar anymore, so there you only have the site favicon on the location bar showing the domain if there is a secure connection and the website is identified.<br />
    Be aware that the presence of a padlock is no guarantee that you are connected to the expected website and that is the main reason for removal of the padlock.
    See also [http://www.dria.org/wordpress/archives/2008/05/06/635/ dria.org » Blog Archive » Firefox 3: Site Identification button]

  • Looking for specific photo content

    I have nearly 2000 photos in iPhoto v5.0.4 (263).
    I want to identify the small number of those which contain pictures of a specific person - is there any way that I can quickly flick through each picture so that, having identified my target in one, I can easily drag that into a new album? Picture individual descriptions are of no help to me for this exercise.
    The only way I can see is to double click on each one, examine it, and then close it and open the next one and so on ad nauseam! A slide show would present them all in sequence, but I can't see how to "capture" specific slides and get them into a new Album.
    Is there a way, or am I condemned to days of increasing RSI as I open and examine each photo in turn?
    Thanks in advance.

    Make the thumbnails larger: use the slider at the bottom right of the iPhoto Window.
    Regards
    TD

Maybe you are looking for