Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: output form...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 2213 of 2241
Post > Topic >>

Re: output formatting in awk

by Ed Morton <morton@[EMAIL PROTECTED] > Mar 31, 2008 at 08:16 AM

On 3/31/2008 7:40 AM, z.entropic wrote:
> I can't figure out how to format the individual output fields of an
> array in the following short awk script:
> 
> ( NR < 8 ) || ( $7 < 6 ) || ( $11 < 0.0 ) {
> next
> }
> s7 && ( $7 != s7 ) {
> V[++n] = FILENAME OFS $7 OFS c10 OFS V11 OFS $11
> } {
> s7 = $7; c10 = $10; V11 = $11
> } END {
> for ( i = 1; i <= n; i++ ) print V[i]
> }
> 
> using the printf() function...  The first field is clearly a string,
> the others are variously formatted numbers.

It's not clear what you're asking for. Provide some small sample input and
the
expected output for that input.

	Ed.




 3 Posts in Topic:
output formatting in awk
"z.entropic" &l  2008-03-31 05:40:58 
Re: output formatting in awk
Ed Morton <morton@[EMA  2008-03-31 08:16:53 
Re: output formatting in awk
Thomas Weidenfeller <n  2008-03-31 18:02:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 7:55:29 CDT 2008.