title: /bin/sh: 1: Syntax error: word unexpected - Using os.system() from Python
body: <p>I'm trying to execute a shell command from python. Here's the command :</p>
  
  <pre><code>(flock -n 200 || (echo no; exit 1) &amp;&amp; (echo yes; cat /home/user/Desktop/instructions.json; &gt;/home/user/Desktop/instructions.json)) 200&gt;&gt;/home/user/Desktop/instructions.json
  </code></pre>
  
  <p>I tried os.system() or subprocess.call(); However I always have the same error which is :</p>
  
  <pre><code>/bin/sh: 1: Syntax error: word unexpected
  </code></pre>
  
  <p>I think the problem is due to parentheses but I'm not sure.</p>
  
  <p>I'm trying to read the file thanks to cat then delete its content IF it's not locked else just echo no and exit.</p>
  
  <p>This command works in shell.</p>