Skip to main content
Contributor
September 15, 2010
Question

Inserting a PURGE command into a script

  • September 15, 2010
  • 3 replies
  • 4945 views
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
    September 15, 2010
    Welcome to the forums. try:
    #purge\ny
    \n = new line Good luck
    Contributor
    September 15, 2010
    That worked perfect. Thank you very much
    Contributor
    September 13, 2011
    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!