ansible 的常用模块中没有判定当文件存在或者不存在时,执行某个执行 使用下面方法能简单判定某个文件是否存在 --- - name: judge a file or dir is exits shell: ls /home/sfy ignore_errors: True register: result - shell: echo "file exit" when: result|succeeded - shell: echo "file not exit" w
有个群友问SubSonic3.0执行存储过程时能不能使用output参数返回值,说测试过后获取不到返回值,早上有些时间所以就尝试修改了一下 首先在数据库中创建一个存储过程 CREATE PROCEDURE [OutValue] @a int, @b int, @c int output AS Set @c = @a + @b GO 打开Settings.ttinclude模板,找到SPParam类,修改为下面代码 public class SPParam{ public string Name;
原创部分: 1.获取返回值 #This is a shell to Deploy Project #!/bin/bashcheck_results=`ps -ef | grep "java"`//变量获取语句执行结果check_results=`cat a.sh` echo "command(ps-ef) results are: $check_results" 2.获取当前文件所在路径 #This is a shell to Deploy Project#!/bi