Fil*_*Fil 3 pipe input exit apache-hive
只是为了提供一些上下文,我正在尝试运行此命令
echo "set hive.execution.engine=tez;" | hive
Run Code Online (Sandbox Code Playgroud)
一旦“set hive.execution.engine...”进入hive交互式shell,hive就会终止,
我想让它留在 hive 交互式 shell 中,但是 shell 然后终止,我又回到了普通的 linux shell。
在后echo结束,输入hive点击文件的结束,所以hive终止。如果您Ctrl-D在交互式 shell 中点击,您可能会获得相同的效果。请尝试以下操作:
(echo "set hive.execution.engine=tez;" ; cat ) | hive
Run Code Online (Sandbox Code Playgroud)
但是,您可能会丢失交互式 shell 的光标移动和其他不错的功能。
编辑:更好的方法可能是将您的set命令放入~/.hiverc每个hive 文档中。