title: How to pass arguments/parameters when executing bash/shell script from NodeJS
body: <p>I have the following code:</p>
  
  <pre><code>exec('sh cert-check-script-delete.sh', req.body.deletedCert);
  console.log(req.body.deletedCert);
  </code></pre>
  
  <p>The console log correctly shows the <code>req.body.deletedCert</code> is non-empty.  </p>
  
  <p>And in <code>cert-check-script-delete.sh</code> I have:</p>
  
  <pre><code>#!/bin/sh
  
  certs.json="./"  # Name of JSON file and directory location
  echo -e $1 &gt;&gt; certs.json
  </code></pre>
  
  <p>But it's just writing an empty line to <code>certs.json</code></p>
  
  <p>I've also tried: </p>
  
  <pre><code>exec('sh cert-check-script-delete.sh' + req.body.deletedCert)
  </code></pre>
  
  <p>But neither formats work</p>