mysql:
shell:
-- 存在的话就删掉
drop table if exists TABLE_NAME;
shell:
#判断非空文件
[ -s $file ]
#判断非空字符串
[ -z $str ]
#位运算
echo 9934234 |awk '{print rshift(and($1,99),3) }';
#局部变量,注意subshell,export等作用域
function inner(){
local i
for((i=0;i<10;i++))
do
# do sth;
done
for((i=0;i<10;i++))
do
inner
done
#shell执行mysql,丢弃column名称
./mysql -Ne"select 1">cc;