linux下整合运维的bash脚本(不完整代码)(分享学习用)

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
clear;

ScriptPath=`pwd`
TEST_SCRIPT(){
if [ ! -f "$ScriptPath/function/$1" ]; then
	echo -e "not exist $ScriptPath/function/$1,so $0 can not be supported!"
	exit 1
else
	echo -e "loading function $1 now, continue ......"
	source $ScriptPath/function/$1
fi
}
SELECT_RUN_SCRIPT(){
	clear;
	TEST_SCRIPT system_base_set.sh
	echo "[Notice] Which function you want to run:"
	select var in "Initialize System" "Install Mysql";do
		case $var in
			"Initialize System")
				SELECT_SYSTEM_BASE_FUNCTION;;
			"Install Mysql")
				TEST_SCRIPT mysql_install.sh
				INSTALL_MYSQL;;
			*)
				SELECT_RUN_SCRIPT;;
		esac
		break
	done
}
SELECT_RUN_SCRIPT