export LANG=zh_CN.utf8 export LC_ALL=zh_CN.utf8 #改变工作目录到当前脚本所在路径 if [[ "$0" =~ / ]]; then cd "${0%/*}"; fi export CWD=`pwd` installpath=`go env GOPATH | awk -F ':' '{print $1}'`/bin echo build linux CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -o ${installpath}/linux_amd64/chat -c -args ftptarget=${installpath}/linux_amd64/chat msh "sftp matrix@47.92.151.165" p=NatsEtcdParser "put $ftptarget" msh "ssh matrix@47.92.151.165" p=NatsEtcdParser "./chat" x='^.*\]\$ $'