[GRASS-user] windows format for temporary file path

Richard Edmonds richard.edmonds at lasra.co.nz
Tue Mar 13 18:07:36 EDT 2012


Hi,
On a google search for building a temporary path in a bash script for 
win grass I found the manual for g.tempfile which lead me to write the line

temp1=`g.tempfile pid=$$`

which, on echo, generated E:\GRASSdata/newLocation/PERMANENT/.tmp/9168.0

and in use results in the following error:
Illegal filename. Character </> not allowed.
<E:\GRASSdata/newLocation/PERMANENT/.tmp/7512.0> is an illegal file name

So, do I have to run sed or some such to convert the / to \? or is there 
a windows safe way to generate a temporary file path? Or better yet an 
OS agnostic way?

Richard


More information about the grass-user mailing list