unix 脚本

网友投稿 508 2022-09-22

unix 脚本

unix 脚本

#!/usr/bin/kshexport ORACLE_SID=mac3dbfunc1(){sqlplus -s mac3_data/oracle<tmp.txtset heading off ;set feedback off ;set linesize 2000;set trimspool on;set trimout on;set pagesize 0;select distinct name||','||type||','||max(line)over(partition by name,type) lstr from user_source;exit;EOF}func2(){sqlplus -s mac3_data/oracle</backup/proc/.set heading off;set feedback off;set pagesize 0;set linesize 2000;set trimout on;set trimspool on;select case when line=1 then 'CREATE OR REPLACE ' ELSE '' END||text||case when line= then chr(10)||'/' else '' end from user_source where name='' and type='';exit;EOF}#tmp1 program_name#tmp2 program_type#file_t program_extension_name#tmp3 program_text_lengthmkdir -p /backup/procfunc1while read strdo    tmp1=`echo $str | cut -f 1 -d ','`    tmp2=`echo $str | cut -f 2 -d ','`    tmp3=`echo $str | cut -f 3 -d ','`    if [ "$tmp2" = "PACKAGE" ]    then        file_t="spec"    elif [ "$tmp2" = "PACKAGE BODY" ]    then        file_t="bdy"    else        file_t="prc"    fi   func2 $tmp1 $file_t $tmp3 "$tmp2" done

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:马哥笔记第一天
下一篇:Unity2018发布WebGL注意事项总结(unity打包webgl无响应)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~