ipc-system-simple icon indicating copy to clipboard operation
ipc-system-simple copied to clipboard

System simple does not recognise metacharacters

Open meganke opened this issue 10 years ago • 1 comments

I'm having problems with using system with metacharacters. I am trying to use system by passing in a single string including a file redirect, ">". I know the same code works on both linux and os x, but on Windows 8.1 using 64 bit strawberry perl 5.20.1.1, the system command fails to recognise the meta-character and split the command.

For Example: system("bwa mem file1 file2 > outputFile") passes ">outputFile" to the bwa executable as a parameter.

meganke avatar Feb 15 '15 20:02 meganke

I'm having problems with using system with metacharacters. I am trying to use system by passing in a single string including a file redirect, ">". I know the same code works on both linux and os x, but on Windows 8.1 using 64 bit strawberry perl 5.20.1.1, the system command fails to recognise the meta-character and split the command.

For Example: system("bwa mem file1 file2 > outputFile") passes ">outputFile" to the bwa executable as a parameter.

Can we assume that, in the example above, bwa and mem are just dummy copy, i.e., not real commands?

jkeenan avatar Jan 24 '20 21:01 jkeenan