program and data via stdin 
Author Message
 program and data via stdin

Thanks guys,

The DOS AWK cam with a suite of free-ware programs from Dave Burton (I
think). It even has Turbo C 2 source code but I'm not getting into C
under Win32. Not enough time. It was originally written by Rob Duff of
Vancouver, BC.

The application is a "personal" text editor written in delphi and the
pipes have worked well for me so far. (It's personal because it has
lots of weird commands to suit the things I do, it's undocumented, and
it will never be released) I like the idea of memory to memory
transfers and no temporary files to clean-up. I was looking for an
alternative to implementing J-Script (don't have the necessary tool
for that either) as a means of producing add-hoc processing

Thanks again, I hear the drawing board calling,



>Boulton) writes:

>>I want to use GAWK as a filter for a Win32 app using anonymous pipes.
>>Is it possible to send the program followed by the text data to GAWK
>>by stdin, separating the two parts with some flag or token? I have a
>>DOS version of AWK which does just that. I was just hoping ...

>Which DOS awk does this?

>Anyway, you could use a line like "<DIVIDER>" to mark the end of the script and
>the beginning of the data, then use the script (I'll call it inline.awk)

>BEGIN { f = "scriptfile" }
>/^<DIVIDER>$/ { close(f); f = "datafile"; next }
>{ print > f }
>END { close(f); system("gawk -f scriptfile datafile") }

>in your pipeline as  gawk -f inline.awk  . I assume you need to do this often,
>the awk scripts coming through the pipeline differ significantly, and the only
>other Win32 tool available to you to separate the script from the data is
>QBasic. If so, the two-step gawk approach may be the lesser of evils (QBasic's
>unpleasant for text processing in pipelines.) If not, then Kenny's right - this
>is a bad way to handle this sort of task.

Fri, 09 Aug 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Switching stdin from program to data

2. Help with reading STDIN when clipper is called via CGI

3. How to read unformatted data from stdin?

4. How to discard data in stdin

5. creating image from stdin data

6. using sys.stdin.raw_input and sys.stdin.readline together in a platform independent way

7. REXXPERTS: Multitasking/Piping with REXX into a program that uses stdin

8. Capturing Stdin/Stdout while calling external programs?

9. serial comm program v.s. stdin in tcsh

10. stdin problem with exec running DOS programs

11. Expect: redirecting stdin of a spawned program

12. Receiving data via serial port


Powered by phpBB® Forum Software