I have a delimited fields file that I want to load into the database in Linux. The thing is that the number of delimited fields is not the same in every row. So, I need a shell script to iterate over each line and check for the number of occurrences of the delimiter character, I need 13 occurrences of the delimiter character per line. So, if I have 10 for example, I need to add 2 extra delimiter characters at the end of this line.
Now all that I have got is this:
#!/usr/bin/bash
while read p; do
if
-----------
fi
done <myDataFile