09 2018 档案

摘要:### 1、列出所有安装过的包 rpm -qa | grep sql ### 2、如何获得某个软件包的文件全名。 rpm -q mysql ### 3、rpm包中的文件安装到那里 rpm -ql lrzsz-0.12.20-27.1.el6.x86_64 ### 4、rpm包中包含那些文件 # 一个没有安装过的软件包,使用 rpm -qlp ****.rpm # 一个已经安装过的软件包... 阅读全文
posted @ 2018-09-30 10:01 chenzechao 阅读(103) 评论(0) 推荐(0) 编辑
摘要:/** * 根据输入的字符串计算出其长度,支持中文和全角字符 * @param str * @return */ public static Integer length(String str){ char[] chars_ss = str.toCharArray(); Integer StringLe... 阅读全文
posted @ 2018-09-29 17:18 chenzechao 阅读(260) 评论(0) 推荐(0) 编辑
摘要:-- 多个值取最大和最小 select least(1,2,3,0,4,5) as min,greatest(1,2,3,0,4,5) as max; +------+------+--+ | min | max | +------+------+--+ | 0 | 5 | +------+------+--+ select coalesce(null,nul... 阅读全文
posted @ 2018-09-29 16:52 chenzechao 阅读(850) 评论(0) 推荐(0) 编辑
摘要:-- 指定时间增加带小数的天数 select day ,add_date_num ,cast(cast(day as bigint) + add_date_num * 24 * 60 * 60 as timestamp) as timestamp_new from ( select cast('2018-01-01' as timestamp) as da... 阅读全文
posted @ 2018-09-29 16:51 chenzechao 阅读(238) 评论(0) 推荐(0) 编辑
摘要:dos2unix * for i in `ls` do id=`echo ${i:0:2}` awk '{print tolower($0)}' "${i}"|grep -Eiw "from"|awk -F 'from' '{print $NF}'|grep -v "("|awk -F'.' '{print $NF}'|awk -v id=${id} '{print id... 阅读全文
posted @ 2018-09-19 17:39 chenzechao 阅读(308) 评论(0) 推荐(0) 编辑
摘要:cat >b <<EOF line1 line2 line3 EOF # 方法1 while read line do echo ${line} done < <(cat b) # 方法2 cat b|while read line do echo ${line} done # 方法3 while read line do echo ${lin... 阅读全文
posted @ 2018-09-19 16:14 chenzechao 阅读(613) 评论(0) 推荐(0) 编辑
摘要:ref:https://blog.csdn.net/trigl/article/details/68944434 阅读全文
posted @ 2018-09-12 10:22 chenzechao 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Oozie使用的时候有以下不便: [a]Oozie调度的Workflow只能使用XML文件配置 [b]启动调度只能通过命令行 [c]无法通过Oozie界面调试调度脚本 [d]Oozie无法可视化调试脚本时候 [e]无法分组,权限管理等 阅读全文
posted @ 2018-09-12 10:08 chenzechao 阅读(647) 评论(0) 推荐(0) 编辑
摘要:### 提取SQL语句 FILE_PATH="/data/SCRIPT" cat tables | while read file do echo "-----> ${file}" start=`grep -nEi "^insert|^with" ${FILE_PATH}/${file}|awk -F':' '{print $1}'|head -1` end=$(... 阅读全文
posted @ 2018-09-05 11:39 chenzechao 阅读(325) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示