Bug #5131

Updated by Brett Smith over 5 years ago

run-command lets you prefix characters with a backslash to prevent it from interpreting them. However, when you do this, it leaves the backslash in the original string. This can leave you in situations where there's no way to write a command that works as intended. For example, here's a user's @command@ parameter:

<pre><code class="json">["bash", "-c", "(vcf-merge \\$(ls -1 *.vcf.gz *recode.vcf.gz | perl -pe 's/\\n/ /g') > merge.vcf)"]</code></pre>

If you remove the backslashes before the @$@, run-command tries to interpret the subcommand. With the backslashes in, however, they get passed to bash, so bash dies with a syntax error.

run-command should "consume" escape backslashes.