I have to replace the content of certain columns, which is NOT empty, leaving attributes of reccords ,where the content was emtpy, empty in a *.csv file by a defined string using a unix shell script on AIX.
e.g. CSV file before processing, replacing NON empty columns 2 and 4 by ***
now after replacing column 2 and 4 by ***:
I've posted a simliar question earlier, the solution for just replacing column 2 and 4 with *** was
perl -F"\35" -ane '$F=$F="***";print join("\35",@F)' input_file.csv
With a column separator being 'Group Separator':
Now the question is how to update the above script, that it only replaces NON empty records columns by *** leaving already empty columns empty and not replacing by ***