I would like to pass an argument to a c++ program in a shell script that just prints it to the console. However, I want to use gnu parallel to do it. At the moment I have a shell script,
#!/bin/sh
parallel -k echo ::: 1 2 3 > cTest
parallel ./hello :::: cTest
where I first create a file 'cTest' that contains the items that will be passed to the executable 'hello'.
At the moment, the above just prints blank spaces. I have tried doing,
parallel echo :::: cTest | ./hello
but this just prints '2' (I am also concerned that the above won't be in parallel).
Does anyone know how to get this working?