title: unexpected EOF while looking for matching
body: <p>i've jenkins job to execute shell script but getting the error unexpected EOF while looking for matching</p>
  <pre><code> servicedir=&quot;dir1&quot;
   checkdir = sh(
   script: &quot;ssh user@hostname bash -c \&quot;' find /home -name \&quot;${servicedir}\&quot; | wc -l '\&quot;&quot;,
   returnStdout: true
   )
  </code></pre>
  <p>return the following error</p>
  <pre><code>bash -c ''\'' find /home -name dir1'
  bash: -c: line 0: unexpected EOF while looking for matching `''
  bash: -c: line 1: syntax error: unexpected end of file
  </code></pre>