These seem to be the candidates:
grep -r '/tmp/' scripts/* | cut -f1 -d: | uniq
scripts/i.oif/i.oif
scripts/i.oif/i.oifcalc
scripts/i.spectral/i.spectral
scripts/r.plane/r.plane
scripts/r.regression.line/r.regression.line
Not sure how to fix them (there was the rumor of a patch available,
though).
I updated i.oif to use g.tempfile. Don't have a lot of time to do any more right now but it should hopefully give an idea of how it might be done for the others.
note there are also a number of C modules which need updating as well:
imagery/i.ask/popup.c
lib/db/stubs/BUILD.PROTO
lib/db/dbmi_driver/mk_dbstubs_h.sh
lib/gis/unix_socks.c
lib/gis/gislib.dox
lib/gis/win32_pipes.c
lib/init/init.sh
lib/init/make_location_epsg_g57.sh
raster/r.digit/main.c
raster/r.median/main.c
raster/r.terraflow/description.html
raster/r.terraflow/main.cc
vector/v.out.ogr/description.html
could someone test that one? There is this sort of thing:
awk '{print sum > "$temp_file"}'
which I am pretty sure will break but don't know enough awk to fix.
If you want to use shell variables in awk commands, the easiest way is
probably to define a corresponding awk variable, e.g.
awk -v temp_file="$temp_file" ...
then use:
print sum > temp_file
within awk.
The alternative is to wrap the awk commands in double quotes, so that
shell variables are substituted.
That's fine for trivial commands, but for more complex commands you
typically end up with undesired substitions (e.g. $1 will be replaced
with the script's first argument, which probably isn't what you want).
> > scripts/i.oif/i.oifcalc
>
> could someone test that one? There is this sort of thing:
>
> awk '{print sum > "$temp_file"}'
>
> which I am pretty sure will break but don't know enough awk to fix.
If you want to use shell variables in awk commands, the easiest way is
probably to define a corresponding awk variable, e.g.
awk -v temp_file="$temp_file" ...
then use:
print sum > temp_file
within awk.
That did the trick, thanks.
i.oif is working again.
I also updated it to use r.univar (the C module) which should make it
a bit faster but gives slightly different answers too. The change is
on the order of 0.0005 though, shouldn't be important to the sort order.
Someone in the know might test to see if r.univar needs to report more
significant digits, etc?
I don't have any tests from before the updates -- all I know is that it
outputs some numbers. Could someone who knows LANDSAT test & see that
they still mean something? (I do know that d.rgb of my highest scoring
results produced a *really* nice false color satellite image)