When I want to know if the fifth field of some data is greater than 500000, then nothing beats
awk '$5 > 500000', but if it gets more complicated than that, I'll probably move to perl. Usually if the script mostly just needs to call system commands, I'll do it in shell, but maybe not depending on how I'm processing the input or output of those commands.
Is that at all useful?