In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File: info.sh start.sh stop.sh
Path $HOME/ggscript/ggoperat
Because after writing too many scripts, sometimes in order to check the running status of OGG, I have to switch frequently between GGSCI and the system interface, so for convenience, I wrote a few relatively simple scripts, together with alias aliases, to simulate the info start stop function in ggsci. At the same time, these scripts can also be called by other scripts to operate or get the process status.
Info.sh
#! / bin/bashif [$#-eq 0]; then echo "INFO EXTRACT" exit 2fiecho $dircd $HOME/ggscript/ggoperatdir=$PWDcd $HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profileficd $dirbackuptime= `date +% Y% m% dmurf% H% M% S`val = $1vale = `echo $val | tr Amurz A-Z`if [`echo $val | grep ^ E`]; then IType=EXTRACTelif [`echo $val | grep ^ P`]; then IType=POSTelif [`echo $val | grep ^ R`]; then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2fipro` = `echo $val.PRM | tr Amurz-z`cd $HOME/ggserver/dirprmif [!-e $pro] Then echo "the PROCESS is not exist" exit 2fi#cd $HOME/ggscript/ggoperatcd $HOME/ggserver (echo INFO $val;echo exit) |. / ggsci
Start.sh
#! / bin/bashif [$#-eq 0]; then echo "START EXTRACT" exit 2fiecho $dircd $HOME/ggscript/ggoperatdir=$PWDcd $HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profileficd $dirbackuptime= `date +% Y% m% dmurf% H% M% S`val = $1vale = `echo $val | tr Amurz A-Z`if [`echo $val | grep ^ E`]; then IType=EXTRACTelif [`echo $val | grep ^ P`]; then IType=POSTelif [`echo $val | grep ^ R`]; then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2fipro` = `echo $val.PRM | tr Amurz-z`cd $HOME/ggserver/dirprmif [!-e $pro] Then echo "the PROCESS is not exist" exit 2fi#cd $HOME/ggscript/ggoperatcd $HOME/ggserver (echo START $val;echo exit) |. / ggsci
Stop.sh
#! / bin/bashif [$#-eq 0]; then echo "STOP EXTRACT" exit 2fiecho $dircd $HOME/ggscript/ggoperatdir=$PWDcd $HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profileficd $dirbackuptime= `date +% Y% m% dmurf% H% M% S`val = $1vale = `echo $val | tr Amurz A-Z`if [`echo $val | grep ^ E`]; then IType=EXTRACTelif [`echo $val | grep ^ P`]; then IType=POSTelif [`echo $val | grep ^ R`]; then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2fipro` = `echo $val.PRM | tr Amurz-z`cd $HOME/ggserver/dirprmif [!-e $pro] Then echo "the PROCESS is not exist" exit 2fi#cd $HOME/ggscript/ggoperatcd $HOME/ggserver (echo STOP $val;echo exit) |. / ggsci
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.