See attached file that includes code, input and output.
I am processing a colon delimited input file and building a ":" (colon) delimited output file.
My printf statement prints contents of each of 20 variables and puts them into a record file. I am pushing out approximately 120 records.
The problem is that if any of those happens to be empty, the ":" is not printed either, so that record is off by one field.
For example my input file has a populated $Comment (6th field) in each of the first two records , but it is empty in the second two records. This throws off my output file by one field.
How do I force it to print ":" so my records will print correctly?
I can get around it by using a test to see if it is empty and populating it but that seems cludgy to me.
Thanks,
SyyyBugg