readLength bash and r updated