• vente viagra pharmacie costo cialis generico preis viagra sildenafil viagra generique sildenafil viagra en belgique proscar preis cialis se vende sin receta precio viagra 25 mg vendita cialis generico in italia viagra comprar online viagra 100mg ohne rezept levitra 20mg preis acheter viagra 50mg cialis rezeptpflicht kamagra jelly kaufen
  • vendita viagra in italia comprar viagra en internet viagra på internet köp levitra köpa viagra online viagra generika günstig viagra frau kaufen viagra prescription médicale prezzo priligy cialis medicamento levitra pil acquisto cialis in italia tadalafil apotheke viagra fabriqué inde medicamento viagra

    Bash or Ruby for removing multiple Trac Spam Tickets

    I had to clean up a public Trac ticket db where anonymous tickets are allowed. I had to issue commands like this:

    trac-admin . ticket remove 58

    I keep forgetting the shell syntax for doing a loop over numbers. But actually a ruby script was just right for the task:

    ruby -e "(49..75).each{|i| %x(sudo -u www-data trac-admin . ticket remove #{i})}"

    This shows some of my reasons to love Ruby: Very intuitive syntax. And faster than to lookup bash syntax.

    2 Responses to “Bash or Ruby for removing multiple Trac Spam Tickets”

    1. Robert J Lowe Says:

      Haha, nice, happy nuking those trac tickets, spam is getting crazy these days.

    2. Damien Says:

      Indeed ruby is very easy to use for that. So I thought you may be interested in the ruby shell called Rush, you can find it there: http://adam.blog.heroku.com/past/2008/2/19/rush_the_ruby_shell/

      I’ve not tried it yet, but it sure sounds interesting. :)