Re: Simple AWK question

2003-06-11 Thread Edward Croft
Have you tried using three in a row. For example, SiteVal,CustomerID On Wed, 2003-06-11 at 12:17, Vidiot wrote: In all my years of using awk, this is the first time I've ever had to output a character to a file. For example, I have the following: sprintf(%s,%s\n, SiteVal,

RE: Simple AWK question

2003-06-11 Thread Kenneth Goodwin
In all my years of using awk, this is the first time I've ever had to output a character to a file. For example, I have the following: sprintf(%s,%s\n, SiteVal, CustomerID) outputfile I suppose you could try sprintf(%c%s%c,%c%s%c\n, '', SiteVal, '', '', CustomerID, '')

Re: Simple AWK question

2003-06-11 Thread Vidiot
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]

Re: Simple AWK question

2003-06-11 Thread johnw02
Try using sprintf(%c, 042 ) and whatever else you need to complete this. In all my years of using awk, this is the first time I've ever had to output a character to a file. For example, I have the following: sprintf(%s,%s\n, SiteVal, CustomerID) outputfile I need the line in

Re: Simple AWK question

2003-06-11 Thread Anthony E. Greene
On 11-Jun-2003/11:17 -0500, Vidiot [EMAIL PROTECTED] wrote: In all my years of using awk, this is the first time I've ever had to output a character to a file. For example, I have the following: sprintf(%s,%s\n, SiteVal, CustomerID) outputfile I need the line in the output file to

RE: Simple AWK question

2003-06-11 Thread Kenneth Goodwin
] 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

Re: Simple AWK question

2003-06-11 Thread mark
From: Vidiot [EMAIL PROTECTED] Date: Wed, 11 Jun 2003 11:17:14 -0500 (CDT) In all my years of using awk, this is the first time I've ever had to output a character to a file. For example, I have the following: sprintf(%s,%s\n, SiteVal, CustomerID) outputfile I need the line in

Re: Simple AWK question

2003-06-11 Thread Vidiot
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() Not using gawk, using the original awk. Don't know if the original awk even supports fprintf()

Re: Simple AWK question

2003-06-11 Thread Vidiot
Your syntax error is that sprintf prints to a string buffer, not a file. Now, p'rhaps he wants fprintf, 'e does, Precious It is interesting how sprintf() filename has been working all the years. Probably for the wrong reason. MB -- e-mail: [EMAIL PROTECTED]