Curly brackets question, with this file content.one one onetwo two twothree 098234one one onetwo two twothree 098234one one onetwo two twothree 098234 ...awk '{ a[NR]=$0 } END {b=0; for (i=1;i<=NR;i++) { b++; printf %s,a[i]; if(b==3) {print;b=0;}}}' fileoutput:one one onetwo two twothree 098234four four fourfive five fivesix 092834 ...Concatenate 3 lines, then add a newline!The need or placement of curly brackets, is not understood correctly, although this works.Would there be other ways of using curly brackets here, with same result?I looked at many similar examples, I was unable to have the result wanted.Not sure my question makes sense, but is there a simple rule of thumb to curly bracket. Thanks
Curly bracket confusion!
awk