using 'system' under win2000/nt/9x 
Author Message
 using 'system' under win2000/nt/9x

Hi all :)

I'm trying to write an awk script that calls a windows executable under
win nt/9x/2000. The problem I'm having is that the 'system' command does
not seem to run.

Does anyone know if this is a problem with awk (not running the system
command under windows) or if there is any way to see what the output
from a system command is??? At the moment it seems to just skip any
'system' commands

eg:

BEGIN {
     print "first print"
     system("echo system echo")
     print "second print"

Quote:
}

returns

first print
second print

(skips the system line.)

I'd love to work under linux et al, but unfortunately the program has to
run under win <whatever>...

Alternatively, does anyone know a way to run a dos/win executable on a
win XX machine from a linux machine using an awk script???

Any and all help greatly appreciated :)

--
Rob Lugton
Software Tester
Computer Associates -  Vet Anti-Virus Software



Sun, 05 Jan 2003 03:00:00 GMT  
 using 'system' under win2000/nt/9x
It works fine as written for me using gawk 3.0.4 under NT, I get :-

first print
system echo
second print

as expected. What version of awk are you using?
chris


Quote:
> Hi all :)

> I'm trying to write an awk script that calls a windows executable under
> win nt/9x/2000. The problem I'm having is that the 'system' command does
> not seem to run.

> Does anyone know if this is a problem with awk (not running the system
> command under windows) or if there is any way to see what the output
> from a system command is??? At the moment it seems to just skip any
> 'system' commands

> eg:

> BEGIN {
>      print "first print"
>      system("echo system echo")
>      print "second print"
> }

> returns

> first print
> second print

> (skips the system line.)

> I'd love to work under linux et al, but unfortunately the program has to
> run under win <whatever>...

> Alternatively, does anyone know a way to run a dos/win executable on a
> win XX machine from a linux machine using an awk script???

> Any and all help greatly appreciated :)

> --
> Rob Lugton
> Software Tester
> Computer Associates -  Vet Anti-Virus Software



Sun, 05 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using 'gets' with SciTe under Win2000

2. changing the shell used by 'system'

3. copy , using 'system'

4. Win2000 has 63,000 'defects'

5. '9X or '95 ?

6. Can't add to system menu on NT

7. Using Python to change Directory ACL's in NT

8. Using Tcl without dll's on NT.

9. Mindy NT 'Bogus Opcode'

10. 'create shortcut' under NT

11. 'exec' mem leak on NT

12. [auto_execok] 'start' is NT builtin

 

 
Powered by phpBB® Forum Software