I dont have my GAWK manual handy, but I think your problem may be that you are using SPRINTF which is a print to string function as in str = sprintf() rather than something like fprintf() or printf()
I would expect that the format overall would be INPUT_SOURCE | awk -f awk-script_file > outputfile and awk-script_file would contain your awk code including something like printf("\"%s\",\"%s\"\n", SiteVal, CustomerID); or the %c format illustrated below... The syntax error may not be the "'s, but your use of sprintf and the more PERL Like >> "filename" . These constructs may have been added in GAWK, but they were not in the original AWK as far as I can remember. Check the manual......... > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Vidiot > Sent: Wednesday, June 11, 2003 1:06 PM > To: [EMAIL PROTECTED] > Subject: Re: Simple AWK question > > > >I suppose you could try > > sprintf("%c%s%c,%c%s%c\n", '"', SiteVal, '"', '"', > CustomerID, '"') >> > >"outputfile" > > awk: syntax error near line 13 > awk: illegal statement near line 13 > awk: newline in string near line 13 > > It is definatly baffling. > > MB > -- > e-mail: [EMAIL PROTECTED] /~\ > The ASCII > \ / > Ribbon Campaign > [So it's true, scythe matters. Willow 5/12/03] X Against > Visit - URL: http://vidiot.com/ / \ > HTML Email > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED] > https://www.redhat.com/mailman/listinfo/redhat-list > -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list