I have a bunch of .text files, most of which end with the standard nl.A couple don't have any terminator at end.  The last physical byte is (generally) an alphameric character.I was using cat *.text >| /tmp/joined.text, but then noticed a couple of places in joined.text where the first line of a file appeared at the end of the last line of a previous file.  Inspecting the previous file, I saw there wasn't a line terminator -- concatenation explained.That raised the question, what's the easiest way to concatenate, sticking in the missing nl?Option 1 -- A solution that might effectively add a blank line to some input files.  For me, that's not a problem as the processing of joined.text can handle it.Option 2 -- A solution that adds the cr/fl only to files that do not already end that way.
How to cat files together, adding missing newlines at end of some files
shell;text processing;cat;newlines