I'm about to test performance of a server which can service multi-clients simultaneously.
Therefore, I'm writing a shell script to execute multiple processes (many clients runs at the same time). When the client ask for input from prompt, I don't know how to pass value to client in shell script in this case.
Please give me some ideas to solve this, I don't have much experience with shell script. Thank you.
In case you can't access the link, here is the .c
source code of client where it needs input from user:
/*prompt the user to enter data*/
printf("Enter a : ?\n"); // When the client runs here, I don't know how to give it a value from shell script
scanf("%u", &client_data.a);
printf("Enter b : ?\n");
scanf("%u", &client_data.b);