> I think the margin of bat vs sh is a larger margin [...] the entire file is reread for each line
Ye agreed. Separation of data and code always was a mistake.
I wonder if this feature of bat files was like a thing once as a "best practice"? Practically, you should only append lines I guess. When I close my eyes, I can see a DOS batch file doing actual batch job processing, appending to itself and becoming a intertwined log and execution script.
My main complaint about sh and Unix is that environment variables are mostly inherited from parent processes, and that can be awkward.
(And Windows at least, these days, is seeing a lot more PowerShell adoption.)