Mail Archives: djgpp/2003/05/07/10:01:27
> Date: Wed, 07 May 2003 14:18:46 +0200
> From: Manuel Collado <m DOT collado AT aaron DOT ls DOT fi DOT upm DOT es>
> Newsgroups: comp.os.msdos.djgpp
> >
> > You are using the quote characters inside quoted strings; DOS/Windows
> > shells do not cope well with these. I suggest to try these commands
> > instead:
> >
> > gawk 'BEGIN {printf(\"================first\")}'> out.txt
> > gawk 'BEGIN {printf(\"++++second+\");}'>> out.txt
> >
> > That is, use single quotes instead of double quotes for the outer
> > quotes. That should work in either shell.
>
> No, the bug has been found by executing awk scripts stored in files.
Then please show an example of this bug that doesn't use command-line
argument quoting.
> Apparently it may be an issue related to how the externally redirected
> stdout handler is passed to gawk. And using bash or the native command
> shell makes a difference.
>
> For DJGPP gawk 3.1.1 on WinNT 4.0, what I find is that any redirection
> of the form
>
> gawk ..... >> outfile
>
> always overwrites outfile from the beginning, but preserving the non
> overwritten contents.
Redirection from the command line has nothing to do with Gawk (or any
DJGPP program). The redirection is done by the shell you are using,
either Bash or CMD.EXE. It's possible that CMD.EXE from NT4 has
problems with redirection when it runs DOS programs (I think I've
heard in the past a couple of reports along these lines, but I'm not
sure).
- Raw text -