[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 7 10:54:34 1999 
Subject:Re: running unix program from pop11 
From:Aaron Sloman 
Volume-ID:990707.03 

Dear Moni,

> i want to invoke an unix program from pop11.

There are several ways to do this. The simplest of all is

	sysobey('.......');

E.g.

	sysobey('ls -l *');

will print out contents of current directory, which may mess up your
screen. If you want the output saved in a file, then do something like:
	sysobey('ls -l * > ls.out ');

If you want the program output to be read in by your pop-11 program,
then you can use pipein. If you want the program to consume stuff
generated by your pop-11 program, then you can use pipeout. Both
pipein and pipeout are described in HELP PIPEUTILS.

The most sophisticated options are provided by run_unix_program
described in the rather complicted file: HELP RUN_UNIX_PROGRAM
E.g. this allows you to create a new unix process to which your
pop-11 process can intermittently send data and from which
it reads data.

I can't tell from your message whether you need such a complex
utility.

> this is my problem, since my program expects a command in the form
>
> program options input

You don't say what sort of input, nor what should happen to the output
of the program. If that is all handled by the program and the options,
then use sysobey, e.g.

	sysobey('sort -u -o outfile infile');

Aaron