File Naming Conventions

BSU main programs should be named with a 4 character process name, starting with the letter “b”. This permits about 17,576 names. An example would be bfoo.f or bfoo.c in Fortran or C. The reason for this is that an output file name is constructed from the input file name (all input file names need to be at least 4 characters, and the first 4 characters are captured to form part of the output file name). In retrospect, the Seismic Unix convention is far superior (using stdin and stdout). But, as you might have guessed, I went through a MSDOS phase (file names restricted to xxxxxxxx.yyy format), and this is an example of the inertia that all ideas have (both good and bad). It isn't absolutely necessary to start a program name with “b”, and the BSU package includes even more deviant examples. This was how I started, and future versions of BSU may abandon this convention.

The file naming convention is to form the output file name as “bfoobbar.seg”, where bfoo is the current process running, and bbar is the first 4 characters of the input file name. In a limited way, the file name becomes a processing history (of rather short memory span). Thus if process bfoo were to read a file babsw001.seg, the output file would be named bfoobabs.seg. Another example would be if bfoo were to read a file xyzfileseven.seg, the output file name would be bfooxyzf.seg. The primary advantage of this scheme is that it generates predictable file names that can be counted on in writing bash scripts that run a string of processes. The disadvantages are too numerous to list. You will probably note that I have deviated from this convention on several occasions. See one of those programs for an example if you need to deviate from the convention.