Next: Packing header and data
Up: Header and Data files
Previous: Header and Data files
How did the RSF program (sfmath) decide where to put the data file?
In the order of priority, the rules for selecting the data file name and the
data file directory are as follows:
- Check out= parameter on the command line. The parameter
specifies the output data file location explicitly.
- Specify the path and the file name separately.
- The rules for the path
selection are:
- Check datapath= parameter on the command line. The parameter
specifies a string to prepend to the file name. The string may contain the
file directory.
- Check DATAPATH environmental variable. It has the same meaning
as the parameter specified with datapath=.
- Check for .datapath file in the current directory. The file may
contain a line
datapath=/path/to_file/
or
machine_name datapath=/path/to_file/
if you indent to use different paths on different platforms.
- Check for .datapath file in the user home directory.
- Put the data file in the current directory (similar to datapath=./).
- The rules for the filename selection are:
- If the output RSF file is in the current directory, the name of the
data file is made by appending .
- If the output file is not in the current directory or if it is
created temporarily by a program, the name is made by appending random
characters to the name of the program and selected to be unique.
Examples:
-
bash$ sfspike n1=10 out=test1 > spike.rsf
bash$ grep in spike.rsf
in="test1"
-
bash$ sfspike n1=10 datapath=/tmp/ > spike.rsf
bash$ grep in spike.rsf
in="/tmp/spike.rsf@"
-
bash$ DATAPATH=/tmp/ sfspike n1=10 > spike.rsf
bash$ grep in spike.rsf
in="/tmp/spike.rsf@"
-
bash$ sfspike n1=10 datapath=/tmp/ > /tmp/spike.rsf
bash$ grep in /tmp/spike.rsf
in="/tmp/sfspikejcARVf"
Subsections
Next: Packing header and data
Up: Header and Data files
Previous: Header and Data files
2012-07-19