@Caliber ,
Not sure if this is the problem, but beeline has a known issue with terminal settings when running in the background.
Try adding this to your script, before the for loop:
export HADOOP_OPTS=-Djline.terminal=jline.UnsupportedTerminal
Cheers,
André
--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.