mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
clean up the docstrings for the cmd module
This commit is contained in:
parent
1ab2b34d86
commit
9c93c5419f
1 changed files with 10 additions and 1 deletions
|
@ -10,7 +10,10 @@ import tempfile
|
|||
|
||||
def run(cmd):
|
||||
'''
|
||||
Execute the passed command and return the output
|
||||
Execute the passed command and return the output as a string
|
||||
|
||||
CLI Example:
|
||||
salt '*' cmd.run "ls -l | grep foo | awk '{print $2}'"
|
||||
'''
|
||||
return subprocess.Popen(cmd,
|
||||
shell=True,
|
||||
|
@ -20,6 +23,9 @@ def run(cmd):
|
|||
def run_stdout(cmd):
|
||||
'''
|
||||
Execute a command, and only return the standard out
|
||||
|
||||
CLI Example:
|
||||
salt '*' cmd.run "ls -l | grep foo | awk '{print $2}'"
|
||||
'''
|
||||
return subprocess.Popen(cmd,
|
||||
shell=True,
|
||||
|
@ -28,6 +34,9 @@ def run_stdout(cmd):
|
|||
def run_stderr(cmd):
|
||||
'''
|
||||
Executa a command and only return the
|
||||
|
||||
CLI Example:
|
||||
salt '*' cmd.run "ls -l | grep foo | awk '{print $2}'"
|
||||
'''
|
||||
return subprocess.Popen(cmd,
|
||||
shell=True,
|
||||
|
|
Loading…
Add table
Reference in a new issue