In degree college whenever I had a data processing task that can be expressed in less than 2 lines, I used to enthusiastically sit and code in C to achieve the desired result. There’s no need to express my grief for the time and effort wasted, because if anything was achieved by the programs, it was my typing speed, which was already more than adequate. The way to go about this is by quick bash script or a few perl commands, or simply a couple of commands separated by pipes are ample in many situations.
The other day I was required to extract a string from a few perl scripts (around 50 of ‘em). Some observation showed that the string appeared after the last comma and after it, 2 end paranthesis ‘)’ were present. Although not being a tabular data in any form, `cut` could still be used pretty nicely in this scenario. The quick-hack though, was the `rev` command which allowed me to cut the last column
grep 'filter_required' *.txt | rev | cut -d ',' -f 1 | rev | cut -d ')' -f 1
cool enough! and pretty quick too… A Unix screen sure is handy at times, even if one loves to stick with Windows for the daily chores.