7/25/2013

Retrieve Email Addresses From Outlook

When we copied a group of email address from outlook, how to export into csv file?
echo "Abc 1234 <abc@example.com>; cde 1234 <cde@example.com>" | tr ';' '\n'|  sed 's/.*/ &/;s/.* <\([^ @]*@[^ @]*.com\).*/\1/'

7/22/2013

XML Format in Console

xmllint is a command line xml tool in console to parse one or more xml files. It also can print type of output by the options selected and detect erros both in XML code.

But I mainly used it to format XML format, by using aliases, it can save a lot of time when doing XML format task.

alias xmlformat="xmllint --c14n '$*' | XMLLINT_INDENT=$'  ' xmllint --encode UTF-8 --format -"
http://xmlsoft.org/xmllint.html

What is Refactoring?

A series of small steps, each of which changes the program's internal structure without changing its external behavior - Martin Fowler ^^~