#!/bin/bash cd `dirname $0` if [ "$1" = "start" ]; then ./start.sh else if [ "$1" = "stop" ]; then ./stop.sh else if [ "$1" = "debug" ]; then ./start.sh debug else if [ "$1" = "res
#!/bin/bash cd `dirname $0` BIN_DIR=`pwd` cd .. DEPLOY_DIR=`pwd` CONF_DIR=$DEPLOY_DIR/conf SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'` if [ -z "$SERVER_NAME" ]; then SERVER_NAME=`hostname` fi PID
在从事软件开发的过程中,经常会涉及到在Linux下将数据库脚本文件从sh格式变为sql格式的问题.本文以一个实际的脚本文件为例,说明格式转换的过程. 1. sh文件内容 本文中的文件名为example.sh,其内容如下: #!/bin/bash function Init() { if [ -f"example.sql" ] then echo"example.sql is exits and is deleting it,then recreate it&qu