Issue
...... This problem is solved.
Solution
At present $I is referencing the iterations of the loop and so 1,2,3 .... These files cannot be found by grep and hence the error.
There are two approaches to ocercome this. $@ contains the parameters passed to the script and so you could try:
grep "enthalpy new" "$@" >> step.txt
Alternatively, if you want to loop through each parameter/file try:
for fil in "$@"
do
grep "enthalpy new" "$fil" >> step.txt
done
Answered By - Raman Sailopal Answer Checked By - David Marino (WPSolving Volunteer)