How to run a bash script from C++ program March 9, 2023 by Tarik Use the system function. system("myfile.sh"); // myfile.sh should be chmod +x