Subject: awk acting funny
From: [email-masked] (Brandon Reed)

25 Oct 1996 21:54:19 -0700
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (Win95; I)
Original-To: [email-masked]
Original-Sender: [email-masked]

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
"[email-masked]" with one line of text: "help".