0

I basically want to write a code that will open terminal on my Mac and run a program. I copied the Terminal application where the executable for the code is. Then I tried:

int system(const char *command);

system("open -a Terminal.app --args gnuplot");

This will open terminal but not nothing more (does not initialize GNUplot).

Thank you!

1 Answers1

0

OP here. I found out the best way to go about this is instead make a .sh file. Within that, I run my code that outputs a data file, and then, within that same .sh file, I run GNUplot how I'd like. It works much better and it automated from terminal instead of trying to make a C code to run terminal.