Use bash and python to prepare hadoop data