gawk system() problem?

J H Buffington jbuff@pacific.net
Sun Jan 14 18:55:00 GMT 2001


At 03:48 PM 1/15/01 +1300, Hoyt, Ben wrote:

> > This  works for me
> > BEGIN {
> >   print system("command.com /c dir")
> >   }
> >
> > but I'm sure that command.com is in my path.
> > I suppose if you're on NT, it might be cmd.exe.
> >
>         Interesting. It doesn't for me. :-( I'm running Win95 and
>command.com is definitely in my path. The above awk program simply displays
>a "0" and nothing else. I guess by "it works for me" you mean displaying the
>directory? Hmmm.. oh well. Thanks again.
>


Yes, I see the directory followed by 0.

See what happens when you type "which command.com"
at the bash prompt.

Try substituting that output for "command.com" in the system call.

BTW, I'm stuck in the "stone age" at Cygwin 1.0 (CD version).
Later versions may work differently.

--jbuff



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list