acheter viagra pour femme preiswert cialis viagra genericos kamagra pillen prescription propecia viagra prijzen viagra in tschechien kaufen impuissance sexuelle achat viagra paris cialis a vendre viagra livraison 48h prezzi levitra achat viagra suisse acheter cialis en ligne cialis rezeptfrei forum
viagra sur paris comprar viagra em portugal comparatif levitra viagra acquisto tadalafil italia kamagra jelly kaufen achat cialis viagra viagra pagamento contrassegno cialis hollande priligy kaufen schweiz remboursement cialis viagras en ligne acquisto cialis svizzera cialis osto baclofen 10 mg viagra allemagne

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:

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