hadoop and shell function which will improve code efficency