[GRASS5] scripting r.in.gdal
Glynn Clements
glynn.clements at virgin.net
Tue Jun 29 19:14:39 EDT 2004
Moritz Lennert wrote:
> newname = `echo $file | awk '{print tolower($1)}`
Apart from the syntax errors (there shouldn't be any spaces around the
equals sign, and the closing single quote is missing), I would expect
"tr" to be more efficient than awk:
newname=`echo $file | tr A-Z a-z`
Although, you could improve efficiency further (particularly on
Cygwin, where the overhead for spawning commands is substantial) with:
ls *.tif | awk '{print "r.in.gdal in=" $1 " out=" tolower($1)}' | sh
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list