Originally Posted By: hybrid8
Does the first command generate a CSV with row IDs from 0 to 13? And the join replaces existing rows in that file with the numbered rows from the source file?

If so, then that definitely going to be the big time saver. I don't need to use the command line to generate the original CSV as I've actually already got another one I can use for this, with IDs from 0 to 255.

If I can join/merge the second csv into this one then that will be perfect. Replacing any existing lines in the target with the corresponding ones from the source.

Yes, that should work. The first command makes what's effectively a "degenerate" CSV file, i.e. just one field, so no commas. The second command, join, is effectively the same as the SQL feature of the same name: it produces lines where fields match in the two files. The "-1 1" makes it match on the first (and only) field in the first file, the 0-13 CSV; the "-2 3" makes it match on the third field in the second file, the codes CSV. The "-a1" makes it a left join, i.e. lines from the 0-13 CSV still get printed even when there's no match in the codes CSV.

Peter