VMS: logicals UNIX: links, but...

Chris Torek chris at mimsy.UUCP
Wed Apr 12 14:39:14 AEST 1989


>chris at mimsy.UUCP (Chris Torek) writes:
>>	model < input1 > output1 &
>>	model < input2 > output2 &

In article <810035 at hpsemc.HP.COM> gph at hpsemc.HP.COM (Paul Houtz) writes:
>   The solutions you recommend are workable in only the simplest 
>situation.  If you have a system that uses many programs interacting
>with many different data files or data bases, this approach is not
>practical.

Had you read the rest of my article, you would have seen that I
acknowledged this.

>   If you ask me, this is a another area where UNIX is deficient.

Hardly.

>   By specifying a simple target file name, such as "journ_entries" or
>"time_card_edited", you can make a command file that puts logicals in
>place to point all these files at the appropriate directories.   If you 
>need to run the program multiple times, or against different data (say
>test data versus real data) or if you need to run a benchmark and have
>multiple instances of the software running at the same time, it becomes
>VERY difficult on UNIX.

Not so.  In fact, I claim it is *easier* on Unix than on VMS, because
a Unix machine comes with the tools you need to automate the creation
of such scripts (awk, grep, sed, lex, yacc).

>I have had to change the SOURCE CODE of programs in order to get them
>to open different files.

If the source is poorly written, or not adapted to the Unix environment,
you may have this sort of problem.  (As long as the code does not attempt
to use pathnames, the solution---which I already gave you---to this
sort of problem is to use subdirectories.)

>   A good example is a program that creates a report destined for a 
>printer named, for example "edit.listing".  One may not like the fact
>that a "named file" is used instead of stdout, but many such programs
>exist in the real world.

Many other idiocies exist in the real world; most of them also have
workarounds.

>So what do you do to run 20 of these programs simultaneously?

	for i in user1 user2 user3 ... user20; do
		mkdir $i; ln ../common/* $i; (cd $i; ../../common/prog) &
	done

>    Does anyone out there know a better solution, or if any vendor has
>decided to add this flexibility to UNIX?

It is already there.
-- 
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