原创部分: 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
#!/usr/bin/env python # -*- coding:utf-8 -*- import subprocess import datetime plist = [] p = subprocess.Popen('net user test1234 /domain',shell=True,stdout=subprocess.PIPE) out,err = p.communicate() for line in out.splitlines(): va = str(line) vafil