The discussion as to whether Yeshoshua wrote the last eight lines or Moshe wrote them "bedimah" (either with tears or "confused") applies only to those lines.
And Moshe the servant of HaShem died in the land of Moav by the word of HaShem.[Devarim 34:5]
On this verse Rashi quotes a famous debate regarding the last eight verses of the Tora; is it possible that Moshe died and wrote “and Moshe died”? Rather, up to here Moshe wrote and from here on Yehoshua wrote. Rebbe Meir says “is it possible that the Sefer Tora is deficient, for it says ‘take this Sefer Tora’ ”? Rather G-d dictated and Moshe wrote in tears (‘b’dima’).
Also note that the Pasuk of the 40 years (Shmos 16:35) is before the sin of the meraglim when the 40 years in the desert was decreed. Thus, it could not have been put in until after the chait hameraglim in the first place.
The statement about the mann could have been dictated when Moshe Rabbeinu wrote the entire Torah just before he died. Thus, since the man was now scheduled to stop immediately thereafter, Moshe Rabbeinu would have been able to write it as part of the final dictation without any problem.
Another point is that since Moshe Rabbeinu gave every shevet a sefer Torah, Yehoshua could not have added extra pesukim in the middle of the Torah. Only the end pesukim could have been added to each already written sefer torah. If Yehoshuah had added pesukim in the middle, the entire torah would have had to be written from scratch (or at least from sheet of parchment with the new pasuk all the way to the end). That is, adding the extra words to the appropriate sheet would have caused words at the end of the sheet to be pushed to the next sheet which would have to be written anew all the way to the end. The torah would have to be taken apart and resewn together as well.
Indeed, we see from the discussions in the Bava Basra 15 that only those pesukim (minor differences in which pesukim do not matter to this inyan) were being discussed. In fact, Rabbi Meir and Rabb Shimon Shezuri (menachos 30) refuse to accept that Yehoshua wrote the last pesukim because they say that the torah that Moshe Rabbeinu gave to the shevatim had to have been complete.
Who Wrote the Torah?
Who Wrote the Torah?
How did we get the Torah? Who wrote it down? If it was Moses, how
could he write about his own death at the end of Deuteronomy?
The Aish Rabbi Replies:
The Torah was given to the entire Jewish people at Mount Sinai. (In
fact, all Jewish souls – past, present and future – were there at the
As for the actual verses, the Torah was dictated from God to Moses,
letter-for-letter. From there, the Midrash (Devarim Rabba 9:4) tells
us that prior to his death, Moses wrote 13 scrolls. Twelve of these
were distributed to each of the Twelve Tribes. The thirteenth was
placed in the Ark of the Covenant (with the stone Tablets). If anyone
would come and attempt to rewrite or falsify the Torah, the one in the
Ark would "testify" against him.
As for the final 8 verses of Deuteronomy, the Talmud has two opinions:
1) Moshe wrote it himself, simply following God's instruction to write
about his own death, or 2) The final 8 verses were written by Joshua.
(sources: Talmud – Menachot 30a, Gittin 60a)