Hi everyone I have to do a program.. I'll be really concise to explain it... And hat I've already done and what i have to do...
Simply, I have to do a "simulator" in Bash that run exercises of students and check if they are correct... for each exercise I have to calculate a score and say if student has passed the exam or not...
I've done almost everything... I think I miss just some line of code to write.. but I think they are the most important too... :(
My script is TEST.SH and i must run the exercise of the student.. the exercise is a script ELABORATO.SH... Now, I can have some scenarios:
- ELABORATO.SH await in input as parameter some values;
- ELABORATO.SH await in input from stdin, from keyboard;
- ELABORATO.SH write output in a file/fifo/etc.. ;
First one point it's really simple to resolve... infact from my TEST.SH I call
ELABORATO.SH
in this way:. ELABORATO.SH param1 param2 param3;
Second and third It's more complex to me..
I have to read from a file a string (and it's ok) and pass this string to
ELABORATO.SH
as the string was from stdin.I have to create a file with the output of
ELABORATO.SH
... so for example, ifELABORATO.SH
produce a file (I don’t know the name of the output file) I have to produce a file too, in another directory... How can I do?