title: Command runs fine manually but when used as script it fails
body: <pre><code>#!/usr/bin/python
  
  import os
  import subprocess
  import sys
  import argparse
  
  user = sys.argv[1]
  pwd = sys.argv[2]
  port = sys.argv[3]
  server = sys.argv[4]
  serverport = sys.argv[5]
  Sslport = sys.argv[6]
  Cert = sys.argv[7]
  Certpass = sys.argv[8]
  Certalias = sys.argv[9]
  
  p = subprocess.Popen(
      "wlst.sh abc.py {0} {1} {2} {3} {4} {5} {6} {7} {8}".format(
          user, pwd, port, server, serverport,
          Sslport, Cert, Certpass, Certalias),
      shell=True, stdout=subprocess.PIPE)
  
  output, err = p.communicate()
  </code></pre>
  
  <p>When I execute above script it fails with below error </p>
  
  <pre><code>/bin/sh: M: command not found
  </code></pre>
  
  <p>When when I process it manually in Unix shell it runs fine. </p>
  
  <p>Also I passed the arguments manually and then processed with Popen then also it ran successfully.</p>
  
  <p>It is only failing when I pass the arguments with format.</p>
  
  <p>Help will be much appreciated.</p>