I have to call one prog1.exe program and give arguments to it and give it's output to another executable prog2.exe in a bash script
prog1 "arguments" | prog2
echo finished
How can I make this to work? Also I suppose echo
command won't be executed before prog2 will finish it's work?
EDIT : When I run
prog1 "argument"
prog2 "example"
prog1 "argument" | prog2
I got correct output from prog1 - std::cout << "arguments" << std::endl
and it's displayed nicely in console and also prog2 is creating file example.txt
so individually both programs are working. Just puting them together with prog1 "arguments" | prog2
doesn't do the trick