Duplicate stdin to stdout

P.F.Hendricks P.F.Hendricks at PacBell.COM
Sat Dec 8 10:14:36 AEST 1990


I have a program that builds a script file to feed input into a program.
My problem is that there is a possiblity of errors occuring during input
however there is no easy way to know where the error occured.

To make things a little clearer here is an example of what I mean.

----------------------------------------
/usr/local/bin/buildlist << EOF
555-1234
John
Doe
1234 Main St.
  .
  .
 (100 to 200 more entries follow)
  .
555-5678
Jane
Zule
2314 Juniper Dr.
EOF
----------------------------------------

There may be an entry already for 'John Doe' but all I get from the
program 'buildlist' is "? DUPLICATE ENTRY", no name, no number, nothing.

What I would like to do is be able to duplicate the input from the script
to the standard ouput, or a file. I've RTFM'd but and my impression is that
it can't be done, but I've been wrong before. So I'm hoping the net wisdom
can enlighten me, in fact I'm counting on it...

BTW - I'm running SYSV 3.1 on a 3B20.

Thank you.

-Paul



More information about the Comp.unix.questions mailing list