|
RE: Separate IN and OUT IO?
|
Kevin Toppenberg
|
Aug 03, 2004 05:09 PDT
|
Excellent, Mike.
Thank you very much!
Kevin
--- Mike Baker <mikel-@yahoo.com> wrote:
| | Your free subscription is supported by today's
sponsor:
|
-------------------------------------------------------------------
-------------------------------------------------------------------
| |
so I think this is what you want.
check this out:
here's the script:
2
RACE
1
ALL
Y
HFS
/tmp/tmp.dat
if you type the command:
mumps -r P^DI < script.dat > test
then the screen output goes to test
here it is:
VA FileMan 22.0
Select OPTION: PRINT FILE ENTRIES
OUTPUT FROM WHAT FILE: RACE//
1 RACE (7
entries)
2 RACE CODE FOR ONCOLOGY (29
entries)
CHOOSE 1-2: RACE (7
entries)
SORT BY: NAME//
START WITH NAME: FIRST//
FIRST PRINT FIELD:
Do you mean ALL the fields in the file? NO// ES
Heading (S/C): RACE LIST//
DEVICE: HOME// Host File Server
HOST FILE NAME: tmp.dat//
Select OPTION:
and the output from the fileman print went into
/tmp.dat which is here:
RACE LIST
AUG
2,2004 23:21 PAGE 1
NAME ABBREVIATION
SYNONYM
|
------------------------------------------------------------------------------------------------------------------------------------
| |
AMERICAN INDIAN OR ALASKA NATIVE 3
AMERICAN INDIAN OR ALASKA NATIVE 3
ASIAN OR PACIFIC ISLANDER 5
BLACK, NOT OF HISPANIC ORIGIN 4
NEGRO
AFROAMERICAN
HISPANIC, BLACK 2
HISPANIC, WHITE 1
UNKNOWN 7
WHITE, NOT OF HISPANIC ORIGIN 6
WHITE
--- Kevin Toppenberg <kdt-@yahoo.com> wrote:
| | Your free subscription is supported by today's
sponsor:
|
|
-------------------------------------------------------------------
| | | | Save up to 67% on Omaha Steaks + Get 6 FREE
|
Burgers
| | and a
FREE Cutlery Set + Cutting Board!
|
|
http://click.topica.com/caacvgpbz8SdcbdRrfja/OmahaSteaks
-------------------------------------------------------------------
| | | |
Thanks for your answer Bhaskar,
I want to post, also, a response I got from the
|
GT.M
| | forum on sourceforge.
I'll have to think about whether what I have
|
learned
| | here is something that I can use. I guess the
entire
program would have to be NOT interactive, which
might
be a bit tricky to accomplish.
Thanks
Kevin
Below is the reply from Sam.
------------------------
Read and respond to this message at:
|
|
https://sourceforge.net/forum/message.php?msg_id=2693649
| | | | By: weiner
Kevin,
It is possible to redirect stdin and stdout
when starting GT.M and they will be used for
$PRINCIPAL.
mumps -run prog.m <input >output
However, it sounds like you want to do this
from within a M program. GT.M does not allow
SETting $PRINCIPAL so this is not possible within
the same GT.M process.
Does this address your question?
Sam
--- K Bhaskar <k.bha-@sanchez.com> wrote:
| | Your free subscription is supported by today's
sponsor:
|
|
|
-------------------------------------------------------------------
| | | | | | Save up to 67% on Omaha Steaks + Get 6 FREE
|
Burgers
| | and a
FREE Cutlery Set + Cutting Board!
|
|
|
http://click.topica.com/caacvgpbz8SdcbexIfea/OmahaSteaks
-------------------------------------------------------------------
| | | | | |
The answer with GT.M is to use the shell for
scripting, e.g.:
bhaskark ~/demo 1:20pm 737: mumps -run iodemo
<iodemo.m >iodemo.out
bhaskark ~/demo 1:21pm 738: cat iodemo.out
iodemo for read x write x,! quit:$ZEOF
quit
bhaskark ~/demo 1:21pm 739: mumps -run iodemo
<<STUFF
? The first verse, the first verse, the fly sat
|
|
on
| | | | the wall
? He loves me, he loves me, he loves me best of
|
all
| | ? STUFF
The first verse, the first verse, the fly sat on
|
the
| | wall
He loves me, he loves me, he loves me best of
|
|
all
| | | |
bhaskark ~/demo 1:22pm 740:
There is currently a bug that prevents the input
from being a pipe, so
the following does not work (but goes into an
infinite loop):
bhaskark ~/demo 1:23pm 741: cat iodemo.out |
|
|
mumps
|
=== message truncated ===
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
|
|
 |
|