Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Return statement error in bash script

Return statement error in bash script

Rising Star

Hi Team, i am using HDP 3.6(hdp 2.6) i have bash script like below after execution this script it return value to next process but even though the script run successfully and executing all stages in script completed successfully it is returning 1, because of this next process (hql script having some business log steps ) is not taking place and if i remove the return statement the next process going smoothly. this problem came after the Hadoop cluster up gradation(HDP 3.4 to 3.6 ) which having Ubuntu 14 and new cluster have Ubuntu 16.

rm ~/sqoop/"$TABLE"/*

rmdir ~/sqoop/"$TABLE"

return $?

Can you please help us to understand what is issue and what happening if remove the return command here and what is impact in production if remove the Return statement?

Don't have an account?
Coming from Hortonworks? Activate your account here