China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 07:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] A question about deleting lines containing a string View 899 Replies 3
Original Poster Posted 2010-06-08 09:52 ·  中国 广东 深圳 电信
新手上路
Credits 12
Posts 6
Joined 2010-06-07 20:36
16-year member
UID 168325
Gender Male
Status Offline
How do I write something to delete the lines in a.est that contain the string 字符串=12 or the string 字符串=22, while keeping the contents of the other lines unchanged?
I just started learning batch processing, and there’s a lot I don’t understand. Thanks to any experts who can help!!
Floor 2 Posted 2010-06-08 10:16 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
This requires a.est to be ANSI encoded:
findstr /i /l /v "字符串=12 字符串=22" a.est>$
move $ a.est


[ Last edited by Hanyeguxing on 2010-6-8 at 10:18 ]
Floor 3 Posted 2010-06-08 11:59 ·  中国 广东 深圳 电信
新手上路
Credits 12
Posts 6
Joined 2010-06-07 20:36
16-year member
UID 168325
Gender Male
Status Offline
Thanks, but Unicode doesn’t work, garbled text appears. What should I do about this?
Floor 4 Posted 2010-06-08 13:17 ·  新加坡
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Forum Jump: