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 3 of 3 Topic 2213 of 2241
Post > Topic >>

Re: output formatting in awk

by Thomas Weidenfeller <nobody@[EMAIL PROTECTED] > Mar 31, 2008 at 06:02 PM

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

Store them formatted here:

V[++n] = sprintf( ... )

Or store each value individually

V[++n,1] = FILENAME
V[n, 2] = $7
V[n, 3] = c10

....

and format them in END

/Thomas




 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 3:28:35 CDT 2008.