Skip to main content
Esteemed Contributor III
Sep 15, 2010 5:01 PM UTC
Question

Inserting a PURGE command into a script

I have, what I hope to be, a simple question. I am writing a script to update our branch firewall Whitelist and would like to include a purge command. My thoughts are to have the script purge the current list and write the new one. My problem is the purge command requires a “y” to acknowledge the request and I can’t figure out how to write this into the script. Basically #config webfilter url #edit 2 #config entries #purge <---------give the y for yes(this is where i get stopped Then write the new list If I putty into the firewall, I can copy and paste my script. I merely added a line after the purge line with a " y" , and it works fine, but if i attempt to load the script as a text file I get an error. I have attempted to paste from the CLI in the web interface and can see the error occurs with the confirmation at the PURGE command

    3 replies

    rwpatterson
    New Member
    Sep 15, 2010 5:59 PM UTC
    Welcome to the forums. try:
    #purge\ny
    \n = new line Good luck
    Translate
    Esteemed Contributor III
    Sep 15, 2010 6:24 PM UTC
    That worked perfect. Thank you very much
    Translate
    Esteemed Contributor III
    Sep 13, 2011 7:10 PM UTC
    I am interested in doing a similar thing but am having no success. I' d like to automate a series of commands including the following. I had planned on simply pasting the series of commands to the command line in the CLI console widget. config wireless-controller wtp-profile edit " 220B" config deny-mac-list purge y end end The line with the lone y is trying to answer the " Do you want to continue" prompt after the purge command. It doesn' t work. purge\ny did not work for me either. I am cutting and pasting from Windows Notepad. Any other ideas on how to approach this? Thanks much!
    Translate
    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024