Friday, March 24, 2006

Key findings

Haven't blogged bash for a while but then BASH is good :)

Problem: Application A has many config files ( only mutiple lines of key=value type), so one big config file is created merging all the ones(in a very randomized fashion). Now how do you verify that the merged configuration file has not missed out anything.

Solution: A single line of bash code :)

for i in small* ; do while read new; do grep -q ${new%=*} big.cfg || echo ${new%=*} of file $i not found in big.cfg ; done < $i ;done

Monday, March 20, 2006

Formula One


Spent this weekend in KL (Kuala lumpur) with some friends from Thoughtworks ..Gabbar..Dator..S2m8kh..Little Chaman..Superman. Had great fun and in the process learnt a thing or two about F1..which I intend to unlearn soon :)...Dator looks crestfallen after Kimi's exit :)