I have a file that contains about 1000 rows and 800 columns. Nearly every row has 800 columns but some DONT. I want to extend the rows that dont have values with NA's. Here is an example:
Add a -v max=(some value) after the awk keyword to tell Dan's command to set the number of columns if the initial line is short and set the max number of columns if the input has more than expected..
Hmm I tried but a blank document comes out. Maybe I forgot to mention that the file is tab delimited. Also does it need to be sorted in a particular order?