Be careful to run this only on one single file at a time. If you run it on multiple files, there'd be many starts and ends that will be more difficult to separate. Try this:
In your 1st posting in this thread, you wanted the output to be
L1F1 \tL1F2 LLF2\tLLF3\tLLF4\n
for each input file where L1F1 is the contents of Line 1 Field 1, L1F2 is Line 1 Field 2, LLF2 is Last Line Field 2, LLF3 is Last Line Field 3, and LLF4 is Last Line Field 4.
Here you are saying the output you want is:
L1F1 \tL1F2 \t LLF2\tLLF3\tLLF4\n
for each input file.
If I'm reading the code supplied by others correctly, pamu's code will give you the information you asked for for every file except the last file given, but the 1st two fields of the 1st two files will be printed before the last fields of the 1st file and subsequent lines (until the last file) will have the 1st fields from file x and the last fields from file x-1. The fields from the last line of the last file will not be printed. In addition, if L1F1 or L1F2 in any file contains a % character or a \ character, the results might not be what you requested.
Subbeh's code will only print the 1st line data from the 1st file and the last line data from the last file.
And, RudiC's code will print:
L1F1,L1F2 LLF2,LLF3,LLF4\n
as long as there are no spaces in any of the fields being printed, but will only process one file at a time.
Note also that the standards do not define the values of $2, $3, or $4 in an END action (but I don't know of any implementation of awk that doesn't do what you want). The code pamu provided is the only one that handles this portably.
I believe the following script does what you requested (as modified above) portably:
Ouch, I missed the separating <TAB>s! And, I concentrated to get those fields into the variables dt_start and dt_end, assuming the requestor wanted to process them further. FAILED by far!