Thanks for the code. But I am getting error on UNIX.
fwtwc@meraqapp01:/openet/u0002/test_files$ awk -F";" '{for(i=1;i<=NF;i++){if(!(i%50)){$i=9006}}}1' OFS=";" RS=ORS="|" newfile.dat
awk: syntax error near line 1
awk: bailing out near line 1
what can be a possible reason. Even tried running
#!/bin/awk -f
before the command
---------- Post updated at 01:26 AM ---------- Previous update was at 01:00 AM ----------
nawk worked for me instead of awk.
But another issue came in some records are of less than 50 in lengths also if the record is not present at all like "||" then the data is getting populated as
|;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9006|