一 脚本内容
1.1 编写脚本内容
[root@km-003 ljf-tmp]# more test.sh
#!/bin/bash
source /etc/profile
deploy(){
DIR_NAME=epm-$1
echo "deploy start $DIR_NAME..."$XMS
}
test(){
XMS=$2
deploy $1 $XMS
}
test $1 $2
1.2 调用执行
[root@km-003 ljf-tmp]# more test.sh
#!/bin/bash
source /etc/profile
deploy(){
DIR_NAME=epm-$1
echo "deploy start $DIR_NAME..."$XMS
}
test(){
XMS=$2
deploy $1 $XMS
}
test $1 $2