Lets say I have a variable storing the name of a compiled C++ program.
executable="myprog.out"
My script tt needs to create a transcript of the C++ program and exit it (without the user having to type exit to exit the bash script command).
So far I've achieved this by doing by calling the bash script command inside tt script like so,
#!/bin/bash
script -q -c $executable transcript
This method works provided that the C++ program doesn't take command line arguments. If I have a variable holding the command line arguments needed for the program as,
progArgs="arg1"
How do I call the script command and have it enter the command line arguments for $executable?