『楼 主』:
如何去掉DOS批处理结尾的换行?
使用 LLM 解释/回答一下
DOS 7.1
批处理bat执行结尾,总是多出一个命令行:
C:\> (此行多余,执行bat文件结尾的0D0A)
C:\>
AUTOEXEC.BAT 也是如此,只要用q、qe、edit编辑过,执行最后总是:(两行)
C:\>
C:\>
尽管无关影响,但总是看着不爽。
尽管用@ECHO OFF可以关掉,但我习惯ECHO ON
曾用Pctools二进制编辑AUTOEXEC.BAT,把0D0A替换成0000,但此过程比较麻烦。且每次qe完后,均须Pctools编辑。
1、DOS下有简便的二进制编辑软件吗?简单把0D0A改成0000,文件结构表不会破坏吧?
2、或者有没有一款DOS文本编辑工具(q、qe、edit不行),允许文本字符后,直接是文件结束符1A ?
Last edited by proof on 2021-3-29 at 16:26 ]
DOS 7.1
When a batch processing bat file is executed, there is always an extra command line at the end:
C:\> (This line is redundant, resulting from the 0D0A at the end of the bat file)
C:\>
The same situation occurs with AUTOEXEC.BAT. As long as it is edited with q, qe, or edit, the last lines after execution are always: (two lines)
C:\>
C:\>
Although it doesn't affect much, it always looks unpleasant.
Although using @ECHO OFF can turn it off, I am used to ECHO ON
I once used Pctools to edit AUTOEXEC.BAT in binary, replacing 0D0A with 0000, but this process is more troublesome. And every time after editing with qe, I have to edit with Pctools.
1. Is there a simple binary editing software under DOS? Simply changing 0D0A to 0000, will the file structure table not be damaged?
2. Or is there a DOS text editing tool (q, qe, edit don't work) that allows the end-of-file character 1A to be directly after the text characters?
Last edited by proof on 2021-3-29 at 16:26 ]
|