欢迎光临
我们一直在努力

OGG运维优化脚本(十一)-查询维护类--操作选择

文件:ggedit

路径:$HOME/ggscript

功能:该脚本用于选择使用其他脚本

通过alias别名初始化入.profile.bash_profile文件,以edit指令方式使用

#!/bin/bash
echo "Select an action you want to perform"

select ch in "addtable" "addtrandata" "annotate" "reannotate" "search" "skiptrans" "exit"
do
case $ch in
"addtable")
	cd $HOME/ggscript/gginsert
     exec ./insert.sh
    ;;
"addtrandata")
     cd $HOME/ggscript/gginsert
     exec ./addtrandata.sh
    ;;
"skiptrans")
    cd $HOME/ggscript/ggtrandata
    exec ./skiptrans.sh
    ;;
"annotate")
    cd $HOME/ggscript/ggcomment
    exec ./comment.sh
    ;;
"reannotate")
    cd $HOME/ggscript/ggcomment
    exec ./recomment.sh
    ;;
"search")
    cd $HOME/ggscript/ggsearch
    exec ./search.sh
    ;;

"exit")
    echo "process complete"
    break;
    ;;
*)
 echo "Please select your choice :"1.addtable" "2.addtrandata" "3.annotate" "4.reannotate" "5.search"  "6.skiptrans" "7.exit" "
 ;;
esac
done;

演示范例

 $edit

Select an action you want to perform

1) addtable 选择批量加表脚本

2) addtrandata选择附加日志新增脚本

3) annotate 选择批量注释脚本

4) reannotate 选择批量取消注释脚本

5) search  —选择批量搜索脚本

6) skiptrans 选择长事务跳过脚本

7) exit 退出

#?

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。