Monthly Archives: September 2009

Depuracao de shell script

Eu sempre usei sh -x para depurar shell script, mas hoje li algo muito interessante na dicas-l. Usando set +x e set -x e possivel ligar e desligar o debug do shell script enquanto ele esta sendo executado, permitindo depurar apenas partes. Fonte: http://www.dicas-l.com.br/cantinhodoshell/cantinhodoshell_20090911.php


Posted via Perl

Posting from command line

I wanted to post to a blog easily from “anywhere”. Well, anywhere means an Android phone or the command line. WordPress was the choice because it supports a XMLRPC mechanism to post and do other stuff.

I successfully tested posts from the phone with wpToGo, and from the command using the script from John Bokma:

http://johnbokma.com/mexit/2006/07/06/perl-post-wordpress-xml-rpc.html

it is great!

Perl and CPAN powers

I always loved how powerful perl is in respect on how to install new modules easily. But i never remember how to do it.

Well, i just needed the SOAP::Lite for XMLRPC, and installed it with the command:

$ perl -MCPAN -e shell
cpa
cpan> install SOAP::Lite
cpan> quit

XML::Simple is another straightforward module to easily parse XML documents.