Why does my DOS version of sed process a file part-way through and then quit?
First, look for errors in the script. Have you used the -n switch without telling sed to print anything to the console? Have you read the docs to your version of sed to see if it has a syntax you may have misused? (Look for an N or H command that gathers too much.) Next, if you are sure your sed script is valid, a probable cause is an end-of-file marker embedded in the file. An EOF marker (SUB) is a Control-Z character, with the value of 1A hex (26 decimal). As soon as any DOS version of sed encounters a Ctrl-Z character, sed stops processing. To locate the EOF character, use Vern Buerg’s shareware file viewer LIST.COM