shell脚本中逻辑判断|| 和-o的使用及区别
(1) shell脚本中逻辑判断|| 和-o的使用及区别-a 与-o 或echo "init_mv begin..."
shell变量$#,$@,$0,$1,$2的含义解释
load.sh脚本如下:#!/bin/bashset -ucurrent_dir=$(cd `dirname $0`; pwd)python ${current_dir}/curl.pyhive -f ${current_dir}/../hive/load_cms.sql$0 :Shell本身的文件名 linux中shell变量$#,$@,$0,$1,$2的含义解释: 变量说明: $$ Shell本身的PID(ProcessID) $!&nb...
Hive如何执行文件中的sql语句
(1) Hive如何执行文件中的sql语句Hive可以运行保存在文件里面的语句,只要用-f参数。 create_table.sh脚本如下:#!/bin/bashhive -f /opt/schedule/schedule-deploy/gfkafka_to_hive/gfrobot/hive/create_table.sqlcreate_table.sql 脚本如下:use odata_rob;create table ...