Posted on Jan 24, 2007

Writing code – Think carefully before doing it!

Today i wrote probably the stupidest program i have ever done. After all these years using Linux (around 5 or 6 by now), with some knowledge of bash, python, sed, awk, of all the things in the world, i got the bright idea to write a C program to parse the text output of a program. Next time, i’ll stick nails in my forehead instead of doing a program of 3 or 4 chained for cycles, with scanf‘s and printf‘s.

The final solution ? 10 or 20 lines on a bash script will solve my problems. There goes 3 hours down the drain!

2 Comments