Mail Archives: cygwin/1996/10/25/21:54:19
I looked through the documentation and FAQ but couldn't find
a reason for the behavior of awk (gawk) ie:
D:\bin> dir | gawk '{print "Hello " $1 }'
GAWK.EXE: cmd. line:1: '{print
GAWK.EXE: cmd. line:1: ^ Invalid char ''' in expression
The same command produces normal output on a unix machine, no errors.
I figured out that I can do:
dir |gawk "{print $1}"
but it's impossible to put anything other than the $1 etc. in the
expression because I can't put quotes inside quotes.
ie dir |gawk "{print $3 " " $1}"
produced errors.
I guess I'm really curious as to why it was necessary to stray from the
normal usage of single quotes around the program (as shown in the gnu
documentation) to use double quotes.
-
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 -