情况如下: 我在ubuntu server 14.04 上面安装了gitlab,来托管项目代码.然后想通过gitlab的web hook 功能来做测试服务器代码自动化更新代码功能.现在遇到一个问题:就是我客户端在master分支上面push代码的时候,我测试服务器的代码目录并没有自动更新.我的shell脚本如下: !/bin/bash echo 'haha:::==' >> /tmp/wtz.log cd /srv/www/bfar-ng echo 'my name is gitlab'>
shell判断一个变量是否为空方法总结 https://www.jb51.net/article/154835.htm 1.判断变量 复制代码代码如下: read -p "input a word :" wordif [ ! -n "$word" ] ;then echo "you have not input a word!"else echo "the word you input is $word"fi 2