parameters: (os_cmd, err2out=False)
docstring: Execute shell command.
  
    If the shell command fails, exit(1).
  
    Args:
      os_cmd: (string) linux shell command to run.
      err2out: whether to send stderr to the same file handle as for stdout.
    Returns:
      results of the linux shell command running.
docstring_summary: Execute shell command.
docstring_tokens: Execute shell command .
function: def ExecuteCmd(os_cmd, err2out=False):
    """Execute shell command.
  
    If the shell command fails, exit(1).
  
    Args:
      os_cmd: (string) linux shell command to run.
      err2out: whether to send stderr to the same file handle as for stdout.
    Returns:
      results of the linux shell command running.
    """
    print "Executing: %s" % os_cmd
  
    try:
      p = subprocess.Popen(
          os_cmd,
          shell=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT if err2out else subprocess.PIPE)
      result, error = p.communicate()
  
      if (not err2out) and error:
        print "ERROR: %s" % error
        Die("Unable to execute %s" % os_cmd)
  
      return result
    except Exception, e:
      Die("FAILED: %s" % str(e))
function_tokens: def ExecuteCmd ( os_cmd , err2out = False ) : print "Executing: %s" % os_cmd try : p = subprocess . Popen ( os_cmd , shell = True , stdout = subprocess . PIPE , stderr = subprocess . STDOUT if err2out else subprocess . PIPE ) result , error = p . communicate ( ) if ( not err2out ) and error : print "ERROR: %s" % error Die ( "Unable to execute %s" % os_cmd ) return result except Exception , e : Die ( "FAILED: %s" % str ( e ) )