how to use concatenation in awk?

how to use concatenation in awk?

am 18.10.2007 22:58:57 von golub.gene

Hi guys

Can somebody tell me how would I concatenate 2 variables in awk?

Thank you, Gene.

Re: how to use concatenation in awk?

am 18.10.2007 23:06:47 von Stephane CHAZELAS

2007-10-18, 13:58(-07), golub.gene@gmail.com:
> Hi guys
>
> Can somebody tell me how would I concatenate 2 variables in awk?

awk '
BEGIN {
a = "foo"
b = "bar"
ab = a b
print ab
}'

("foo" "bar") is the same as "foobar".

--
Stéphane

Re: how to use concatenation in awk?

am 18.10.2007 23:06:48 von William James

On Oct 18, 3:58 pm, golub.g...@gmail.com wrote:
> Hi guys
>
> Can somebody tell me how would I concatenate 2 variables in awk?
>
> Thank you, Gene.

a b

Juxtaposition causes concatenation.