VMS: logicals UNIX: links, but...

Chris Torek chris at mimsy.UUCP
Sat Apr 8 15:50:11 AEST 1989


In article <475 at caldwr.UUCP> rfinch at caldwr.UUCP (Ralph Finch) writes:
>We run models, and often want to run the same model, simultaneously,
>in the same directory, with two different input files, and produce two
>corresponding output files.

Instead of using `logicals' or links or symlinks or . . ., just:

	model < input1 > output1 &
	model < input2 > output2 &

If the program uses several input files and creates several output
files, and if it cannot be made to name its files based on a single
argument, either of these more complex (and therefore less desirable)
approaches will work:

subdirectories:
	mkdir subdir1
	mkdir subdir2
		[ put specific inputs into subdirectories ]
	...
		[ put common inputs into both subdirectories ]
	ln common_files subdir1
	ln common_files subdir2
	(cd subdir1; ../model in1 out1 in2 out2) &
	(cd subdir2; ../model in1 out1 in2 out2) &

or (csh syntax) environment variables:
	(setenv INPUT1 inA1; setenv INPUT2 inA2; model &)
	(setenv INPUT1 inB1; setenv INPUT2 inB2; model &)

If you MUST emulate VMS logical symbols, use environment variables.
They are not identical, but they are usually close enough.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list