|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
已从你的google论坛上下载了sed纯DOS版。并考贝到C盘,也按你的代码修改了test1.bat和test2.bat,但还是出现如下错误:
c:\>type a.txt
19
c:\>test1
一般性错误读驱动器F
A:放弃,R:重试,F:失败?a
c:\>
不知何解,请高手赐教。
I have downloaded the pure DOS version of sed from your Google forum and copied it to the C drive. I also modified test1.bat and test2.bat according to your code, but the following error still occurs:
c:\>type a.txt
19
c:\>test1
General error reading drive F
A: Abort, R: Retry, F: Fail? a
c:\>
I don't know what's wrong. Please ask the experts for advice.
|
|
2008-1-4 14:05 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
重新测试发现,在命令行输入sed /?时,出现:
一般性错误读驱动器F
A:放弃,R:重试,F:失败?a
测试环境:DOS7.1
Re - test found that when entering sed /? at the command line, the following appears:
General error reading drive F
A: Abort, R: Retry, F: Fail? a
Test environment: DOS 7.1
|
|
2008-1-4 14:11 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
晕~你也太.....
C盘是Fat32吗?
C盘在Path里吗?
C盘在DOS下确实是C盘吗?
DOS下先找到sed,或者sed test1 test2放一起
Oh, you're too... Is the C drive Fat32? Is the C drive in the Path? Is the C drive indeed drive C under DOS? Under DOS, first find sed, or put sed test1 test2 together
|

第一高手 第二高手
我的小站
 |
|
2008-1-4 14:18 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
是在一起的,是用Microsoft Virtual PC做的DOS虚拟机。文件格式是Fat32,安装系统是DOS7.1
所有的文件都在同一个目录下。test1.bat、test2.bat、sed.exe、以及前面提到的find.exe等等都在一起。
谢谢!
They are together, and it's a DOS virtual machine made with Microsoft Virtual PC. The file format is Fat32, and the installed system is DOS 7.1. All the files are in the same directory. test1.bat, test2.bat, sed.exe, and the previously mentioned find.exe, etc., are all together. Thanks!
|
|
2008-1-4 15:00 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
对不起,是都放在了C:盘的根目录下,包括A.TXT。从E:盘拷过去的。在E:盘下出出现同样问题。
I'm sorry, they are all placed in the root directory of drive C:, including A.TXT. They were copied from drive E:. The same problem occurs under drive E:.
|
|
2008-1-4 15:02 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
你那个path变量更改下否则麻烦不断
或者试试这样
@echo off
call test2.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
:start1
if "%1"=="" goto end
.\sed -n "/%1/p" A.TXT>nul
if not errorlevel 1 if errorlevel 0 goto xxx
shift
goto start1
goto end
:xxx
shift
echo %1>A.TXT
:end
Last edited by fastslz on 2008-1-4 at 03:36 PM ]
You need to change your path variable, otherwise there will be endless troubles.
Or try this:
@echo off
call test2.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
:start1
if "%1"=="" goto end
.\sed -n "/%1/p" A.TXT>nul
if not errorlevel 1 if errorlevel 0 goto xxx
shift
goto start1
goto end
:xxx
shift
echo %1>A.TXT
:end
Last edited by fastslz on 2008-1-4 at 03:36 PM ]
|

第一高手 第二高手
我的小站
 |
|
2008-1-4 15:35 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
c:\>type a.txt
2
一般性错误读驱动器F
A:放弃,R:重试,F:失败?f
Load error: no DPMI - Get csdpm*b.zip
在出现“一般性错误读驱动器F”提示时,如果输入"f",就出现"Load error: no DPMI - Get csdpmi*b.zip"
请教:什么是“DPMI”,上面的话是什么意思?如何解决?
c:\>type a.txt
2
General error reading drive F
A: Abort, R: Retry, F: Fail? f
Load error: no DPMI - Get csdpm*b.zip
When the "General error reading drive F" prompt appears, entering "f" results in "Load error: no DPMI - Get csdpmi*b.zip"
Ask: What is "DPMI"? What does the above mean? How to solve it?
|
|
2008-1-4 16:42 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
|
2008-1-4 17:32 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
|
2008-1-4 17:49 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
谢谢指教,再次运行之:
C:\>DPMI.EXE
C:\>TYPE A.TXT
2
C:\>TEST1
C:\>TYPE A.TXT
2
运行dpmi.exe后,没有错误出现,但A.TXT里的内容却不会替加了,保持原来的值。还有,DPMI是不是每运行一次sed.exe前都要运行一次?
谢谢!
Thanks for the instruction. Run again:
C:\>DPMI.EXE
C:\>TYPE A.TXT
2
C:\>TEST1
C:\>TYPE A.TXT
2
After running DPMI.EXE, there are no errors, but the content in A.TXT is not added and remains the original value. Also, does DPMI need to be run once before each time sed.exe is run?
Thanks!
|
|
2008-1-4 18:20 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
|
2008-1-4 19:16 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
|
2008-1-4 22:57 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
|
2008-1-5 14:16 |
|
|
kavenlee72
中级用户
  
积分 369
发帖 87
注册 2003-9-14
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
问题没解决,不会替加!:(:(:(
请教fastslz老大,有办法解决么?
谢谢了!
Last edited by kavenlee72 on 2008-1-5 at 06:58 PM ]
The problem is not solved, and I won't add it! :(:(:(
Asking boss fastslz, is there a way to solve it?
Thank you!
Last edited by kavenlee72 on 2008-1-5 at 06:58 PM ]
|
|
2008-1-5 16:55 |
|
|
everdos
初级用户
 
积分 52
发帖 21
注册 2008-1-1
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
用fc试试
test1.bat
--------------------------------------------------------------------------------------------
@echo off
call test2.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
type A.TXT
--------------------------------------------------------------------------------------------
test2.bat
--------------------------------------------------------------------------------------------
:start1
echo %1 > A2.TXT
fc A.TXT A2.TXT > nul
shift
if "%1"=="" goto end
if errorlevel 1 goto start1
echo %1 > A.TXT
:end
Try using fc
test1.bat
--------------------------------------------------------------------------------------------
@echo off
call test2.bat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
type A.TXT
--------------------------------------------------------------------------------------------
test2.bat
--------------------------------------------------------------------------------------------
:start1
echo %1 > A2.TXT
fc A.TXT A2.TXT > nul
shift
if "%1"=="" goto end
if errorlevel 1 goto start1
echo %1 > A.TXT
:end
|
|
2008-1-5 20:21 |
|