Skip to main content
reformat question
Source Link
Yaron
  • 4.4k
  • 2
  • 22
  • 33

iI have bash script like below afterthis:

rm ~/sqoop/"$TABLE"/*
rmdir ~/sqoop/"$TABLE"
return $?

After execution this script it returnreturns a value to next process but even though the script run successfully and executing all stages in script completed successfully itit is returning 1, because of.

Because this - the next process is not taking place and if i.

If I remove the return statement the next process going smoothly. this problem came after the Hadoop cluster up gradation 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 how the next process is running successfully if remove the return command here and what is impact in production if remove the Return statement?

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 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 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 how the next process is running successfully if remove the return command here and what is impact in production if remove the Return statement?

I have bash script like this:

rm ~/sqoop/"$TABLE"/*
rmdir ~/sqoop/"$TABLE"
return $?

After execution this script it returns a value to next process but even though the script run successfully and executing all stages in script completed successfully it is returning 1.

Because this - the next process is not taking place.

If I remove the return statement the next process going smoothly. this problem came after the Hadoop cluster up gradation which having Ubuntu 14 and new cluster have Ubuntu 16.

Can you please help us to understand what is issue and how the next process is running successfully if remove the return command here and what is impact in production if remove the Return statement?

Source Link
gs rao
  • 43
  • 2
  • 5

Return value error in bash scripts

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 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 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 how the next process is running successfully if remove the return command here and what is impact in production if remove the Return statement?