3 ms·
Batch files on Windows do the same thing. That’s caught me out far more often, because I make errors in my batch files much more often than I do with shell scri
by chrismorgan 7y ago
Batch files on Windows do the same thing. That’s caught me out far more often, because I make errors in my batch files much more often than I do with shell scripts.
- malkia 7y agoI was just going to comment on this. I believe batch files buffer on line, but can't confirm.
- jz_ 7y agoThey do. Can be used it to interact with the execution of the current program. It is simple as appending further code with a label and jumping to it using goto. I first noticed it in 2007 started using it in production.
- leghifla 7y agoOn the other hand, I used this behaviour to my advantage in the DOS era. I had written a small utility to easily start my games (a Pascal program). My goal was to get as much memory free for the games. To allow unloading my program before launching the game, I wrote a bat script which first launched my program. My program would replace the last line of the script with the game to start (and a goto begining), and then terminate. Now, command.com would start my game, without any memory overhead. When I quit my game, I come back to my utility. At the time, security was not my concern...