title: ShellCheck warning: "Remove surrounding $() to avoid executing output. [SC2091]"
body: <p>I have the following set of commands in my script:</p>
  
  <pre><code>message="Secure copying file $remoteHost"
  backupLogOutput "Info $message"
  $(scp  "$file" "$remoteUser"@"$remoteHost":"$remotePath")  &gt;&gt; "$BACKUPLOG"
  backupErrorHandler "$?" "$message"
  </code></pre>
  
  <p>ShellCheck is giving me the warning on the scp line (3):</p>
  
  <blockquote>
    <p>Remove surrounding $() to avoid executing output. [SC2091]</p>
  </blockquote>
  
  <p>The script works. I do want to execute the output. Shall I ignore this warning or should the scp line be written in a different way? </p>