Gathen: 397706991, learning together
Conf/hive.xml
Specific shell code Download: http://download.csdn.net/detail/luo849278597/9490920
<?xml version= "1.0" encoding= "UTF-8"?>
<root>
bin/hive.sh
#!/bin/bash ######################## #以下命令的处理基于Hadoop环境以及Hive工具, and the corresponding tool commands need to be defined #sed命令是Shell编程中用于处理字符串 in the environment variable, The command to filter out the required string #tr-d ' r ' is used to delete line breaks in each row #eval used to execute string commands ######################## #get the environment if [-f ~/.BASHRC]; #进入B Ash shell command, for execution then of the following command. ~/.BASHRC fi #file exit if [-Z $]; Then #判断配置文件是否存在 Echo ' Usage:command FILENAME ' exit 0 fi #预定义变量以及数组 declare-a analysis_sqls declare-i i=0 flag=0 cont Ent= ' Sed-e ' s/\s*\ (. *\) \s*$/\1/g '-E ' s/\s*\ (=\) \s*/\1/g '-E '/^\ (\s\) *$/d '-e '/^$/d '-e ' s/<!--. *-->//' $ ' whil E read line do if echo ${line}|grep-qe "^