Is it possible to embed shell scripts into a higher-level programming language, for example, C++?
How would one go about doing that? For example, do you just place the script somewhere in the C++ code and the compiler is able to understand the script and the C++ code too?
Can you embed shell scripts into higher-level languages ? Answer: Yes
You can always use the system api calls to execute any command and hence any shell script.
In C++, you can call the
system function, like