BEGIN{
fn="./data/text2.txt"
#sample1
a="a,b,c"
print a > fn
b="1,2,3"
print b >> fn
close(fn)
check(fn)
print ""
#sample2
a="a,b,c"
b="1,2,3"
c=a "\n" b
print c > fn
close(fn)
check(fn)
}
function check(filename)
{
while(getline < filename > 0)
{
print $0
}
close(filename)
}
a,b,c
1,2,3
a,b,c
1,2,3