I'm writing a script (TEST.sh) that must run another script (TASK.sh)... Task.sh need two input... so I was thinking to redirect input from a file (I need to automize everything)...
So, I was using theese solutions:
exec "$assessment_tests/task.sh" "$parameters" < "$testdir/stdin" > "$testdir/output2";
But I receive an "access denied" error
And this other solution
bash "$assessment_tests/task.sh" "$parameters" < "$testdir/stdin" > "$testdir/output2";
(I've changed exec with bash)
In the second way i can run the script task.sh but in output2 i always find the message "Input wrong" where "Input wrong" is the output of task.sh... But I should obtain "Input ok"...
My stdin file is just a row with the value "my_input"
Any suggestion?
thanx