Vlad,
Thanks for help.
I tried this with the following:
{
if (FNR==1) {
if (NR>1) close(fn)
gsub(/([,]+|[ ]+)/, "_");
gsub(/"/, "");
print;
}
}
and ran it like gawk -f script *.dat
I got an output of
bbb
aaaaaaaa
It did not substitute the space...