Gene,
Simply place the variables next to each other:

awk '
BEGIN {
        foo = "hello";
        bar = "world";

        c = foo bar;

        print c;
}'

Running this small example, c is assigned the concatination of both vars and is printed as 'helloworld' on the stdout device.

Scott

On Thu, 18 Oct 2007, gene golub wrote:


Hi gurus

Do you know if i can concatenate values from variables in awk?

Thank you , Gene.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to