michael - 2021-09-20

I have a gnuplot script that automates fitting for a couple of 100 of data.
afterward I want to collate this fitted data but fail to properly access the files

the relevant part of the script is at the moment

do for [iw=1:500] [
iw3=sprinf("%003.f",iw)
file='fit'.iw3.'.data
`grep ' T =' file|head-1 >'tmp.data'
}

and it cannot acces "file", as apparently the variable substitution does not work.
Any help to get around this would be very much appreciated