map-reduce framework in bash and awk