sed, awk (gawk), and Perl


As a programmer, I like the Unix commands “find” and “grep”. They are too good. “find” to find the files recursively based on file name, file type, etc, then execute command towards the files.

“grep” is even more better, when I want to find some words in the source code, and I can use regular expression. Combine “grep” with “sed”, one can perform search and replace.

However, when I want to search and replace for multiple patterns, “sed” will be difficult to be used. One can write a shell script to perform the task. But “awk” (or GNU awk) will be a better solution for me. Write an awk script, can search and replace easier, and awk script allows to use variables.

But, “awk” is not good enough. “awk” is difficult to perform search and replace with regular expression that needs backreferences and lazy quantifier. To do these tasks, Perl is the best!

Yes! I never thought that Perl is that good. Because for me, using Perl to do web development is more difficult than using PHP. Using Perl to write an application is not better than using C/C++, because it is an interpreted language, not compiled language. But, if using Perl as a programmer’s tool, it is good for everything. Recursive file renaming with regular expression and recursive search and replace with regular expression, I can only solve these two tasks with Perl script.

(Though I was taught to use zsh to perform recursive file renaming with regular expression, but now I think Perl script is powerful enough.)

Trying out WordPress.com


After trying WordPress from WordPress.org, and using the x10Hosting, I really attracted by WordPress. That is why, now I am trying WordPress.com, because the PHP hosting is not good enough for my expectation.

I am still thinking about, which one is suitable for me, Blogger or WordPress.