Mail Archives: cygwin/1996/10/28/22:12:27
> gawk isn't broken. bash isn't broken. If anything is "broken," it's
> COMMAND.COM (CMD.EXE) [DOS shell] -- actually it's just different. gawk
> does not interpret the single quotes; that's the shell's job. DOS shell
> does not understand single quotes so it passes them to the gawk as is.
COMMAND.COM does absolutely no interpretation of the command line at
all. It send it to you as-is, including the space after the command
name and the carriage return at the end. It does not know about
quotes, single or double. Parsing it is entirely up to the
application.
Perhaps what cygnus's gawk is getting is a single argument (argv[1])
that includes the entire command line, including all the stray quotes,
as if you had typed this at the unix command line:
gawk \''{ printf("%d %s\n", $3, $2"); }'\'
^^ ^^
> So the bottom line is if you want to run your gawk script from a DOS
> shell, you will probably need to read your gawk program from a file
> (gawk -f pgm.awk).
That explains why DJGPP's gawk works correctly from COMMAND.COM, as I
stated in my previous message.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -