Hi
I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it
The code is that:
{
if (NF==17){
print $0
}else{
fields=NF;
all=$0;
while (fields<17){
getline;
todo=sprintf("%s %s",all,$0);
campos=fields + NF;
fields=campos;
all=todo;
}
print all;
}
}
i execute it:
awk -F '@@@' -f kk.awk productos.TXT
awk: program limit exceeded: sprintf buffer size=1020
FILENAME="productos.TXT" FNR=2 NR=2
How could I make the buffer not to get full?
thanks