> I'm using the "r" (replace) instruction correctly: 1rfrom,to will > start at line 1 and replace "from" with "to". > > But it looks like a leading space is ignored, so edlin treats my > "1rwritten, written" as just "1rwritten,written" and seems to ignore > it because the "from" and "to" strings are the same. > > FYI: I can add a space in the middle of a replaced word, such as: > > *1rtext,te xt > 1: This is a plain te xt file,written in edlin. > > Is "ignore leading spaces after the comma in the 'r' command" the > expected behavior from MS-DOS edlin?
I haven't used EDLIN in a LONG time (decades), but just did an experiment with MS-DOS 7.1 EDLIN. Your problem doesn't seem to be unrecognized spaces, it seems to be that you're not using any sort of "escape" character to separate your input and output strings. I believe you think the comma should be the "escape" character and it isn't. There's a similar issue with programs like SED and AWK/GAWK. When I'm in EDLIN (at least the one with comes with MD-SOD 7.1) and I type "?" to get help, the syntax for the Replace command looks like this: Replace [startline][,endline][?]R[oldtest][CTRL+Znewtest] It expects you to use a Ctrl-Z (end-of-file character) as the "escape" character. If I use the Ctrl-Z "trick" I can replace things like you're wanting to do. I do not remember if earlier versions of EDLIN did this or not, nor do I know how FD-EDLIN works. _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel