Q:

Is it possible to run a c++ code and send the output to a python code in a bash file?

I have a C++ code that uses NVIDIA DRIVEWORKS (CUDA) and extracts some images.
I have a Python code that takes the extracted images and do processing.
My question is that is it possible to run two codes in a single bash file?
Any comment/help is appreciated.
Thanks!

A:

From my understanding of your question you want to run a C++ program to extract images and then put them in a folder. Then you want a python script to process those images. Based on that the script should be three lines to run the C++ code, a wait command to pause the script and then the call to the python script. You just have to make sure the python script is pointed to the folder that the C++ program is outputting to.
#!/bin/bash
./cpp_processing
wait
python ./python_script

N.B. Modifications to this script and the wait timer are almost certainly required.

