/tmp/
. GRASS temporary files are created in the data base with the assumption
that there will be enough space under the data base for large files.
GRASS periodically removes temporary files that have been left behind
by programs that failed to remove them before terminating.
g.tempfile
creates an unique file and prints the name. The user is required to provide
a process-id which will be used as part of the name of the file.
Most Unix shells provide a way to get the process id of the current shell.
For /bin/sh
and /bin/csh
this is $$
.
It is recommended that $$
be specified as the process-id for
g.tempfile.
/bin/sh
scripts the following syntax should be used:
temp1=`g.tempfile pid=$$` temp2=`g.tempfile pid=$$`
/bin/csh
scripts, the following can be used:
set temp1=`g.tempfile pid=$$` set temp2=`g.tempfile pid=$$`
/bin/sh
scripts,
learn to use the /bin/sh
related trap
command. If you
write /bin/csh
scripts, learn to use the /bin/csh
related onintr
command.
Available at: g.tempfile source code (history)
Latest change: Friday Dec 27 01:53:45 2024 in commit: bd53b2448f13719ddb4f5b4d5cf373f8c259de0b
Main index | General index | Topics index | Keywords index | Graphical index | Full index
© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1dev Reference Manual