Hi, On Fri, Jun 17, 2011 at 17:12, Stefano Lattarini <stefano.lattar...@gmail.com> wrote: > Hi Bert, and thanks for persiting on this.
only for today, I'm in vacation for the next two weeks ;-) But I try to post a patch today. > You could avoid the use of printf above by using the "automatic concatenation" > feature of awk: > $ echo x y | awk '{print $1 s $2}' s=":" > $ x:y > And now try this (the various "^[" represent the escape character): > $ red='^[[0;31m' grn='^[[0;32m' std='^[[m' > $ echo aaa bbb ccc | awk '{print red $1 grn $2 std $3 }' red="$red" > grn="$grn" std="$std" > Works as a charm also with Solaris 10 /bin/sh and /bin/awk, and with NetBSD > 5.1 /bin/sh > and /usr/bin/awk :-) Argh, I should have known, Thanks for this. Than, I think we could finish this today. Bert > > HTH, > Stefano >