Looking for NT awk/gawk 
Author Message
 Looking for NT awk/gawk

I am having the hardest time finding a version of awk/gawk that runs
under NT that

1) Does not crash (MKS version)
2) Supports pipes (Brian Kernighan's version)
3) Pipes work (gawk)

I don't know the my gawk error is configuration or what,  but when I
user the --lint option I get

gawk: fullbld.awk:63: warning: failure status (127) on pipe close of
"cmd.exe /c dir" (error 0)

line 63 reads

"cmd.exe /c dir" | getline

Anyone know of another version,  or how to fix my problem above,

Much appreciated,

Steve



Fri, 27 Jul 2001 03:00:00 GMT  
 Looking for NT awk/gawk

Quote:

>I am having the hardest time finding a version of awk/gawk that runs
>under NT that

>1) Does not crash (MKS version)
>2) Supports pipes (Brian Kernighan's version)
>3) Pipes work (gawk)

>I don't know the my gawk error is configuration or what,  but when I
>user the --lint option I get

>gawk: fullbld.awk:63: warning: failure status (127) on pipe close of
>"cmd.exe /c dir" (error 0)

>line 63 reads

>"cmd.exe /c dir" | getline

At some point later in the code, you need

close ( "cmd.exe /c dir" )

Would be my first guess...
--
Steve



Fri, 27 Jul 2001 03:00:00 GMT  
 Looking for NT awk/gawk

Quote:

>I don't know the my gawk error is configuration or what,  but when I
>user the --lint option I get

>gawk: fullbld.awk:63: warning: failure status (127) on pipe close of
>"cmd.exe /c dir" (error 0)

>line 63 reads

>"cmd.exe /c dir" | getline

>Anyone know of another version,  or how to fix my problem above

A guess: would this dir call be writing more than 23 lines to stdout? If so,
when you run a dir command from a console window, does dir pause when a full
screen's worth of lines have been displayed? If so, your pipe may be failing
because the dir command is expecting input from stdin which it can't get. Try
"cmd.exe /c dir /-p" | getline


Sat, 28 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. looking for windows NT/2000 binary for gawk 3.1.1 (or better)

2. AWK newbie is looking for a AWK help with his 1st program

3. awk/gawk textfile-problem

4. awk, nawk & gawk

5. Heuristic search algorithms in awk/gawk

6. AWK or GAWK ?

7. AWK/NAWK/GAWK questions !

8. GNU Awk (gawk) 3.0.5 now available

9. awk/gawk stop after processing 40mill lines

10. GAWK vs AWK

11. How is this done in awk/nawk/gawk?

12. Help me with awk or gawk on Linux redhat 5.0

 

 
Powered by phpBB® Forum Software